Skip to content

Commit 9a23c1d

Browse files
committed
20230709A
1 parent 388adab commit 9a23c1d

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

hugoalh.GitHubActionsToolkit/module/nodejs-wrapper.psm1

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,12 @@ Function Test-NodeJsEnvironment {
150150
Catch {
151151
Throw 'Unable to find NodeJS!'
152152
}
153-
Try {
154-
If ($NodeJsVersionMinimum -gt [SemVer]::Parse((
155-
node --no-deprecation --no-warnings --eval='console.log(JSON.stringify(process.versions));' |
156-
Join-String -Separator "`n" |
157-
ConvertFrom-Json -Depth 100 |
158-
Select-Object -ExpandProperty 'node'
159-
))) {
160-
Throw
161-
}
162-
}
163-
Catch {
153+
If ($NodeJsVersionMinimum -gt [SemVer]::Parse((
154+
node --no-deprecation --no-warnings --eval='console.log(JSON.stringify(process.versions));' |
155+
Join-String -Separator "`n" |
156+
ConvertFrom-Json -Depth 100 |
157+
Select-Object -ExpandProperty 'node'
158+
))) {
164159
Throw 'NodeJS is not match the requirement!'
165160
}
166161
}

0 commit comments

Comments
 (0)