Set HOME variable from OS information
This commit is contained in:
committed by
Benoit Daloze
parent
b3cff1b264
commit
74138471e3
+5
-2
@@ -92706,8 +92706,11 @@ function envPreInstall() {
|
|||||||
if (windows) {
|
if (windows) {
|
||||||
// puts normal Ruby temp folder on SSD
|
// puts normal Ruby temp folder on SSD
|
||||||
core.exportVariable('TMPDIR', ENV['RUNNER_TEMP'])
|
core.exportVariable('TMPDIR', ENV['RUNNER_TEMP'])
|
||||||
// bash - sets home to match native windows, normally C:\Users\<user name>
|
// Use os.homedir() which calls the Windows API (SHGetFolderPath) directly.
|
||||||
core.exportVariable('HOME', ENV['HOMEDRIVE'] + ENV['HOMEPATH'])
|
// 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
|
// bash - needed to maintain Path from Windows
|
||||||
core.exportVariable('MSYS2_PATH_TYPE', 'inherit')
|
core.exportVariable('MSYS2_PATH_TYPE', 'inherit')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,8 +219,11 @@ function envPreInstall() {
|
|||||||
if (windows) {
|
if (windows) {
|
||||||
// puts normal Ruby temp folder on SSD
|
// puts normal Ruby temp folder on SSD
|
||||||
core.exportVariable('TMPDIR', ENV['RUNNER_TEMP'])
|
core.exportVariable('TMPDIR', ENV['RUNNER_TEMP'])
|
||||||
// bash - sets home to match native windows, normally C:\Users\<user name>
|
// Use os.homedir() which calls the Windows API (SHGetFolderPath) directly.
|
||||||
core.exportVariable('HOME', ENV['HOMEDRIVE'] + ENV['HOMEPATH'])
|
// 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
|
// bash - needed to maintain Path from Windows
|
||||||
core.exportVariable('MSYS2_PATH_TYPE', 'inherit')
|
core.exportVariable('MSYS2_PATH_TYPE', 'inherit')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user