You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hugoalh.GitHubActionsToolkit/module/utility.psm1
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -72,8 +72,8 @@ Function Get-WebhookEventPayload {
72
72
Param (
73
73
[Alias('ToHashtable')][Switch]$AsHashtable
74
74
)
75
-
If (![System.IO.Path]::IsPathFullyQualified($Env:GITHUB_EVENT_PATH)) {
76
-
Write-Error-Message 'Unable to get the GitHub Actions webhook event payload: Environment path `GITHUB_EVENT_PATH` is not defined or not contain a valid file path!'-Category 'ResourceUnavailable'
75
+
If (!([System.IO.Path]::IsPathFullyQualified($Env:GITHUB_EVENT_PATH) -and (Test-Path-LiteralPath $Env:GITHUB_EVENT_PATH-PathType 'Leaf'))) {
76
+
Write-Error-Message 'Unable to get the GitHub Actions webhook event payload: Environment path `GITHUB_EVENT_PATH` is not defined or not contain a valid file path, or file is not exist!'-Category 'ResourceUnavailable'
0 commit comments