Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0b4e032

Browse files
rkeithhillTylerLeonhardt
authored andcommitted
Fix node version detect logic to handle node v10 (#2025)
1 parent f108ba7 commit 0b4e032

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎build.ps1‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,17 @@ function needsVSCode () {
4545

4646
function needsNodeJS () {
4747
try {
48-
$nodeJSVersion = (node -v)
49-
48+
$nodeJSVersion = node -v
5049
} catch {
5150
return $true
5251
}
53-
return ($nodeJSVersion.Substring(1,1) -lt 6)
52+
53+
if ($nodeJSVersion -notmatch 'v(\d+\.\d+\.\d+)') {
54+
return $true
55+
}
56+
57+
$nodeVer = [System.Version]$matches[1]
58+
return ($nodeVer.Major -lt 6)
5459
}
5560

5661
function needsPowerShellGet () {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /