Fix from review

This commit is contained in:
Alban Auzeill
2026-07-13 17:14:12 +02:00
parent 2dfea3d9ad
commit bc1610626e
4 changed files with 10 additions and 6 deletions
+3 -2
View File
@@ -3997,7 +3997,8 @@ function convertToUnixPath(windowsPath) {
function setupGpgHome() {
const dirName = `gpg-${randomBytes(4).toString("hex")}`;
for (const base of [process.env.RUNNER_TEMP, os$1.tmpdir()].filter(Boolean)) {
const runnertemp = process.env.RUNNER_TEMP;
for (const base of [runnertemp, os$1.tmpdir()].filter(Boolean)) {
const gpgHome = path$1.join(base, dirName);
if (process.platform === "win32" || (gpgHome + LONGEST_GPG_SOCKET).length <= MAX_GPG_SOCKET_PATH) {
fs$1.mkdirSync(gpgHome, { recursive: true, mode: 0o700 });
@@ -4008,7 +4009,7 @@ function setupGpgHome() {
throw new Error(
`Cannot create a GPG home directory with a short enough path for GPG sockets. ` +
`The longest socket path (gpgHome + "${LONGEST_GPG_SOCKET}") must not exceed ${MAX_GPG_SOCKET_PATH} characters. ` +
`Consider setting RUNNER_TEMP to a shorter path.`
`Consider setting RUNNER_TEMP to a shorter path, was "${runnertemp || '<empty>'}".`
);
}