Skip to content

Commit e03be9f

Browse files
committed
20220629B
1 parent 5e96478 commit e03be9f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

hugoalh.GitHubActionsToolkit/module/nodejs-test.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
.SYNOPSIS
1111
GitHub Actions - Test NodeJS Environment
1212
.DESCRIPTION
13-
Test the current machine whether has compatible NodeJS and NPM environment, and has dependencies ready. Test result always cache for reuse.
13+
Test the current machine whether has compatible NodeJS and NPM environment, and has dependencies ready; Test result always cache for reuse.
1414
.PARAMETER ReinstallDependencies
1515
Force to reinstall dependencies even though available.
1616
.PARAMETER Retest

hugoalh.GitHubActionsToolkit/module/utility.psm1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ Function Get-WorkflowRunUri {
103103
[CmdletBinding(HelpUri = 'https://github.com/hugoalh-studio/ghactions-toolkit-powershell/wiki/api_function_get-githubactionsworkflowrunuri#Get-GitHubActionsWorkflowRunUri')]
104104
[OutputType([String])]
105105
Param ()
106+
If (!(Test-Environment)) {
107+
Return (Write-Error -Message 'Unable to get GitHub Actions resources!' -Category 'ResourceUnavailable')
108+
}
106109
Return "$Env:GITHUB_SERVER_URL/$Env:GITHUB_REPOSITORY/actions/runs/$Env:GITHUB_RUN_ID"
107110
}
108111
Set-Alias -Name 'Get-WorkflowRunUrl' -Value 'Get-WorkflowRunUri' -Option 'ReadOnly' -Scope 'Local'

0 commit comments

Comments
 (0)