train-core 3.16.3 → 3.16.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/train/platforms/detect/helpers/os_windows.rb +25 -19
- data/lib/train/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26ee1ca7669521f387e6d8197f6938e472c62ac3b2a90455d92601428dbc4567
|
|
4
|
+
data.tar.gz: edee65e63113ad20679fd27ae9bdfb51a4c44f3e6aa956e334d8b4f666976221
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3346b3ac6600eaaf7dd35e1eea70e3b3d0a05e8f48fcf68e66d5b56a268ae4db3f71c5a9fb9c5207d500eea7701a070a04d22bf3be3af4db7d8c84e6384acec
|
|
7
|
+
data.tar.gz: fda8990679bb40cd29cd2e2b81bf9b4531e3f79c76b11a5b5114ba25f917862a247e41f3d821a1b9b316e89ce41d15ab71cc09283938a807f18bb18cf336a92b
|
|
@@ -244,27 +244,33 @@ module Train::Platforms::Detect::Helpers
|
|
|
244
244
|
|
|
245
245
|
# Fallback method for reading OS info using cmd-only commands when wmic is not available
|
|
246
246
|
def read_cmd_os
|
|
247
|
-
# Try to get architecture from PROCESSOR_ARCHITECTURE environment variable
|
|
247
|
+
# Try to get architecture from PROCESSOR_ARCHITECTURE environment variable.
|
|
248
248
|
# This covers the same architectures as wmic CPU detection but uses environment variables
|
|
249
|
-
# which are available on all Windows versions since NT
|
|
249
|
+
# which are available on all Windows versions since NT.
|
|
250
250
|
arch_res = @backend.run_command("echo %PROCESSOR_ARCHITECTURE%")
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
251
|
+
arch_string = arch_res.exit_status == 0 ? arch_res.stdout.strip.downcase : ""
|
|
252
|
+
|
|
253
|
+
# In PowerShell sessions (e.g., WinRM in Test Kitchen), CMD-style variable
|
|
254
|
+
# expansion is not supported — %PROCESSOR_ARCHITECTURE% is returned literally
|
|
255
|
+
# rather than being expanded. Fall back to PowerShell syntax in that case.
|
|
256
|
+
if arch_string.empty? || arch_string == "%processor_architecture%"
|
|
257
|
+
ps_res = @backend.run_command("$env:PROCESSOR_ARCHITECTURE")
|
|
258
|
+
arch_string = ps_res.exit_status == 0 ? ps_res.stdout.strip.downcase : ""
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
unless arch_string.empty?
|
|
262
|
+
@platform[:arch] = case arch_string
|
|
263
|
+
when "x86"
|
|
264
|
+
"i386"
|
|
265
|
+
when "amd64", "x64"
|
|
266
|
+
"x86_64"
|
|
267
|
+
when "ppc", "powerpc"
|
|
268
|
+
"powerpc"
|
|
269
|
+
else
|
|
270
|
+
# For any unknown architecture, preserve the original value
|
|
271
|
+
# This handles: arm64, ia64, arm, mips, alpha, and future architectures
|
|
272
|
+
arch_string
|
|
273
|
+
end
|
|
268
274
|
end
|
|
269
275
|
# If PROCESSOR_ARCHITECTURE fails, architecture remains unset (consistent with other methods)
|
|
270
276
|
|
data/lib/train/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: train-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.16.
|
|
4
|
+
version: 3.16.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chef InSpec Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|