diff --git a/common.js b/common.js index 3ee6c242e..c62d22686 100644 --- a/common.js +++ b/common.js @@ -281,7 +281,7 @@ export function getOSNameVersionArch() { function findWindowsVersion() { const version = os.version() - const match = version.match(/^Windows(?: Server)? (\d+) (?:Datacenter|Enterprise)/) + const match = version.match(/^Windows(?: Server)? (\d+) (?:Standard|Datacenter|Enterprise)/) if (match) { return match[1] } else { diff --git a/dist/index.js b/dist/index.js index 1c731bdb9..187dd7c32 100644 --- a/dist/index.js +++ b/dist/index.js @@ -614,7 +614,7 @@ function getOSNameVersionArch() { function findWindowsVersion() { const version = os.version() - const match = version.match(/^Windows(?: Server)? (\d+) (?:Datacenter|Enterprise)/) + const match = version.match(/^Windows(?: Server)? (\d+) (?:Standard|Datacenter|Enterprise)/) if (match) { return match[1] } else { @@ -92706,8 +92706,8 @@ 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']) + // bash - sets home to match native windows + 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 7fdcf5b3e..e898dbb7a 100644 --- a/index.js +++ b/index.js @@ -219,8 +219,8 @@ 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']) + // bash - sets home to match native windows + core.exportVariable('HOME', os.homedir()) // bash - needed to maintain Path from Windows core.exportVariable('MSYS2_PATH_TYPE', 'inherit') }