Skip to content

Commit

Permalink
Node Bootstrap: Cast OS version to int so compat code works (#83190)
Browse files Browse the repository at this point in the history
This wasn't working for me because `OSMajor` was set to a string, not a
number, so it failed the if check.

Making this change made it work
  • Loading branch information
MrStonedOne authored and LikeLakers2 committed Jun 22, 2024
1 parent a674b53 commit 4c372f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/bootstrap/node_.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if ($Env:TG_BOOTSTRAP_CACHE) {
}

# Get OS version
$OSMajor = (Get-WmiObject -Class Win32_OperatingSystem).Version.Split(".")[0]
[int]$OSMajor = (Get-WmiObject -Class Win32_OperatingSystem).Version.Split(".")[0]

# Set Node version based on OS version
if ($OSMajor -lt 10) {
Expand Down

0 comments on commit 4c372f8

Please sign in to comment.