Keep macOS GPG verification homes within socket limits

Use /tmp for signature verification on macOS while preserving runner temp behavior elsewhere. Cover long and canonical OS temp paths and regenerate action bundles.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 32d31c8d-ddbc-4e57-a5c3-f70588fef3f3
This commit is contained in:
Bruno Borges
2026-09-09 02:12:24 -04:00
co-authored by Copilot App
parent 7f2b3ca2cf
commit a5aaf7ca60
6 changed files with 152 additions and 137 deletions
+3 -5
View File
@@ -35747,8 +35747,6 @@ __nccwpck_require__.d(__webpack_exports__, {
var cleanup_java_core = __nccwpck_require__(3838);
// EXTERNAL MODULE: external "fs"
var external_fs_ = __nccwpck_require__(9896);
// EXTERNAL MODULE: external "os"
var external_os_ = __nccwpck_require__(857);
// EXTERNAL MODULE: external "path"
var external_path_ = __nccwpck_require__(6928);
// EXTERNAL MODULE: external "crypto"
@@ -35769,7 +35767,6 @@ var src_util = __nccwpck_require__(4527);
const GPG_HOME_PREFIX = 'setup-java-gpg-';
const VERIFY_GPG_HOME_PREFIX = 'verify-signature-gpg-home-';
async function isGpgAvailable() {
@@ -35846,8 +35843,9 @@ async function verifyPackageSignature(archivePath, signatureUrl, publicKeyConten
const signaturePath = await tc.downloadTool(signatureUrl);
let gpgHome;
try {
// Long RUNNER_TEMP paths can exceed macOS's 104-byte gpg-agent socket limit.
gpgHome = createGpgHome(VERIFY_GPG_HOME_PREFIX, os.tmpdir());
// Both RUNNER_TEMP and TMPDIR can exceed macOS's 104-byte agent socket limit.
const tempDir = process.platform === 'darwin' ? '/tmp' : util.getTempDir();
gpgHome = createGpgHome(VERIFY_GPG_HOME_PREFIX, tempDir);
}
catch (error) {
try {