diff --git a/dist/index.js b/dist/index.js index 704b9da..dba1be0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -92706,8 +92706,11 @@ function envPreInstall() { if (windows) { // puts normal Ruby temp folder on SSD core.exportVariable('TMPDIR', ENV['RUNNER_TEMP']) - // bash - sets home to match native windows, normally C:\Users\ - core.exportVariable('HOME', ENV['HOMEDRIVE'] + ENV['HOMEPATH']) + // Use os.homedir() which calls the Windows API (SHGetFolderPath) directly. + // Env-based approaches (USERPROFILE, HOMEDRIVE+HOMEPATH) are unreliable on some + // runners (e.g. Blacksmith) where these vars are unset, causing NaN which + // JSON.stringify serializes to "null". + core.exportVariable('HOME', os.homedir()) // bash - needed to maintain Path from Windows core.exportVariable('MSYS2_PATH_TYPE', 'inherit') } diff --git a/index.js b/index.js index 7fdcf5b..fc8bbe6 100644 --- a/index.js +++ b/index.js @@ -219,8 +219,11 @@ function envPreInstall() { if (windows) { // puts normal Ruby temp folder on SSD core.exportVariable('TMPDIR', ENV['RUNNER_TEMP']) - // bash - sets home to match native windows, normally C:\Users\ - core.exportVariable('HOME', ENV['HOMEDRIVE'] + ENV['HOMEPATH']) + // Use os.homedir() which calls the Windows API (SHGetFolderPath) directly. + // Env-based approaches (USERPROFILE, HOMEDRIVE+HOMEPATH) are unreliable on some + // runners (e.g. Blacksmith) where these vars are unset, causing NaN which + // JSON.stringify serializes to "null". + core.exportVariable('HOME', os.homedir()) // bash - needed to maintain Path from Windows core.exportVariable('MSYS2_PATH_TYPE', 'inherit') }