Skip to content

Commit 15af6b7

Browse files
committed
20221016B
1 parent 44af067 commit 15af6b7

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

hugoalh.GitHubActionsToolkit/module/nodejs-test.psm1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ Function Test-NodeJsEnvironment {
4646
Write-Verbose -Message 'Test NPM.'
4747
Get-Command -Name 'npm' -CommandType 'Application' -ErrorAction 'Stop' |# `Get-Command` will throw error when nothing is found.
4848
Out-Null# No need the result.
49-
[String[]]$ExpressionNpmVersionResult = npm --version# NPM sometimes display other useless things which unable to suppress.
49+
[String]$ExpressionNpmVersionResult = npm --version |
50+
Join-String -Separator "`n"
5051
If (
5152
$ExpressionNpmVersionResult -inotmatch $SemVerRegEx -or
52-
$NpmMinimumVersion -igt [SemVer]::Parse(($Matches[0] -ireplace '^v', ''))
53+
$NpmMinimumVersion -igt [SemVer]::Parse(($ExpressionNpmVersionResult -ireplace '^v', ''))
5354
) {
5455
Throw
5556
}
@@ -72,7 +73,7 @@ Function Test-NodeJsEnvironment {
7273
) -cmatch 'MISSING'
7374
) {
7475
Write-Verbose -Message 'Install/Reinstall NodeJS wrapper API dependencies.'
75-
npm ci --no-audit --no-fund |
76+
npm ci --ignore-scripts --no-audit --no-fund |
7677
Out-Null# No need the result.
7778
If ($LASTEXITCODE -ine 0) {
7879
Throw

hugoalh.GitHubActionsToolkit/module/nodejs-wrapper/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)