Skip to content

Commit

Permalink
20230709A
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoalh committed Jul 9, 2023
1 parent 388adab commit 9a23c1d
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions hugoalh.GitHubActionsToolkit/module/nodejs-wrapper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,12 @@ Function Test-NodeJsEnvironment {
Catch {
Throw 'Unable to find NodeJS!'
}
Try {
If ($NodeJsVersionMinimum -gt [SemVer]::Parse((
node --no-deprecation --no-warnings --eval='console.log(JSON.stringify(process.versions));' |
Join-String -Separator "`n" |
ConvertFrom-Json -Depth 100 |
Select-Object -ExpandProperty 'node'
))) {
Throw
}
}
Catch {
If ($NodeJsVersionMinimum -gt [SemVer]::Parse((
node --no-deprecation --no-warnings --eval='console.log(JSON.stringify(process.versions));' |
Join-String -Separator "`n" |
ConvertFrom-Json -Depth 100 |
Select-Object -ExpandProperty 'node'
))) {
Throw 'NodeJS is not match the requirement!'
}
}
Expand Down

0 comments on commit 9a23c1d

Please sign in to comment.