From e18931febc2c6052e1678c2e8b468a9a658e5c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ja=CC=84nis=20Baiz=CC=8Ca?= Date: Mon, 2 Mar 2026 11:23:44 +0200 Subject: [PATCH 1/3] Add support for Windows Server Standard Evaluation blacksmith.sh runners use "Windows Server 2025 Standard Evaluation". --- common.js | 2 +- dist/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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..358fd668d 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 { From 7e44e2550202afb5e3cf5f893221001ba2a0588e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ja=CC=84nis=20Baiz=CC=8Ca?= Date: Mon, 2 Mar 2026 21:37:15 +0200 Subject: [PATCH 2/3] Set HOME variable from OS information --- dist/index.js | 7 +++++-- index.js | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 358fd668d..2f96ba363 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 7fdcf5b3e..fc8bbe6a6 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') } From 23fc5fa5965d08e37387c218eeafbb07c71e963a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ja=CC=84nis=20Baiz=CC=8Ca?= Date: Fri, 6 Mar 2026 12:49:23 +0200 Subject: [PATCH 3/3] Leave only basic comment about env variable change --- dist/index.js | 5 +---- index.js | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 2f96ba363..187dd7c32 100644 --- a/dist/index.js +++ b/dist/index.js @@ -92706,10 +92706,7 @@ function envPreInstall() { if (windows) { // puts normal Ruby temp folder on SSD core.exportVariable('TMPDIR', ENV['RUNNER_TEMP']) - // 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". + // 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 fc8bbe6a6..e898dbb7a 100644 --- a/index.js +++ b/index.js @@ -219,10 +219,7 @@ function envPreInstall() { if (windows) { // puts normal Ruby temp folder on SSD core.exportVariable('TMPDIR', ENV['RUNNER_TEMP']) - // 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". + // 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')