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
If (!(Test-GitHubActionsEnvironmentPath-InputObject $FileCommandPath)) {
87
+
If (![System.IO.Path]::IsPathFullyQualified($FileCommandPath)) {
89
88
Throw
90
89
}
91
90
}
92
91
Catch {
93
-
Write-Error-Message "Unable to write the GitHub Actions file command: Environment path ``$($FileCommand.ToUpper())`` is undefined!"-Category 'ResourceUnavailable'
92
+
Write-Error-Message "Unable to write the GitHub Actions file command: Environment path ``$($FileCommand.ToUpper())`` is not defined!"-Category 'ResourceUnavailable'
If (!(Test-GitHubActionsEnvironmentPath-InputObject $Env:GITHUB_STEP_SUMMARY)) {
33
-
Write-Error-Message 'Unable to write the GitHub Actions step summary: Environment path `GITHUB_STEP_SUMMARY` is undefined!'-Category 'ResourceUnavailable'
26
+
If (![System.IO.Path]::IsPathFullyQualified($Env:GITHUB_STEP_SUMMARY)) {
27
+
Write-Error-Message 'Unable to write the GitHub Actions step summary: Environment path `GITHUB_STEP_SUMMARY` is not defined!'-Category 'ResourceUnavailable'
If (!(Test-GitHubActionsEnvironmentPath-InputObject $Env:GITHUB_STEP_SUMMARY)) {
231
-
Write-Error-Message 'Unable to get the GitHub Actions step summary: Environment path `GITHUB_STEP_SUMMARY` is undefined!'-Category 'ResourceUnavailable'
224
+
If (![System.IO.Path]::IsPathFullyQualified($Env:GITHUB_STEP_SUMMARY)) {
225
+
Write-Error-Message 'Unable to get the GitHub Actions step summary: Environment path `GITHUB_STEP_SUMMARY` is not defined!'-Category 'ResourceUnavailable'
If (!(Test-GitHubActionsEnvironmentPath-InputObject $Env:GITHUB_STEP_SUMMARY)) {
261
-
Write-Error-Message 'Unable to remove the GitHub Actions step summary: Environment path `GITHUB_STEP_SUMMARY` is undefined!'-Category 'ResourceUnavailable'
254
+
If (![System.IO.Path]::IsPathFullyQualified($Env:GITHUB_STEP_SUMMARY)) {
255
+
Write-Error-Message 'Unable to remove the GitHub Actions step summary: Environment path `GITHUB_STEP_SUMMARY` is not defined!'-Category 'ResourceUnavailable'
If (!(Test-GitHubActionsEnvironmentPath-InputObject $Env:GITHUB_STEP_SUMMARY)) {
300
-
Write-Error-Message 'Unable to write the GitHub Actions step summary: Environment path `GITHUB_STEP_SUMMARY` is undefined!'-Category 'ResourceUnavailable'
293
+
If (![System.IO.Path]::IsPathFullyQualified($Env:GITHUB_STEP_SUMMARY)) {
294
+
Write-Error-Message 'Unable to write the GitHub Actions step summary: Environment path `GITHUB_STEP_SUMMARY` is not defined!'-Category 'ResourceUnavailable'
@@ -74,7 +73,7 @@ Function Get-WebhookEventPayload {
74
73
[Alias('ToHashtable')][Switch]$AsHashtable
75
74
)
76
75
If ([String]::IsNullOrEmpty($Env:GITHUB_EVENT_PATH)) {
77
-
Write-Error-Message 'Unable to read the GitHub Actions webhook event payload: Environment path `GITHUB_EVENT_PATH` is undefined!'-Category 'ResourceUnavailable'
76
+
Write-Error-Message 'Unable to get the GitHub Actions webhook event payload: Environment path `GITHUB_EVENT_PATH` is not defined!'-Category 'ResourceUnavailable'
If ([String]::IsNullOrEmpty((Get-Content-LiteralPath "Env:\$EnvironmentPath"))) {
102
-
Write-Error-Message "Unable to get the GitHub Actions workflow run URI: Environment path ``$EnvironmentPath`` is undefined!"-Category 'ResourceUnavailable'
101
+
Write-Error-Message "Unable to get the GitHub Actions workflow run URI: Environment path ``$EnvironmentPath`` is not defined!"-Category 'ResourceUnavailable'
103
102
Return
104
103
}
105
104
}
@@ -187,25 +186,25 @@ Function Test-Environment {
187
186
Try {
188
187
If ($Null-ieq$Condition.ExpectedValue) {
189
188
If ([String]::IsNullOrEmpty((Get-Content-LiteralPath "Env:\$($Condition.Name)"-ErrorAction 'SilentlyContinue'))) {
190
-
Throw
189
+
Throw"Unable to get the GitHub Actions resources: Environment path ``$($Condition.Name)`` is not defined!"
191
190
}
192
191
}
193
192
Else {
194
193
If ((Get-Content-LiteralPath "Env:\$($Condition.Name)"-ErrorAction 'SilentlyContinue') -ine$Condition.ExpectedValue) {
195
-
Throw
194
+
Throw"Unable to get the GitHub Actions resources: Environment path ``$($Condition.Name)`` is not defined or not equal to expected value!"
196
195
}
197
196
}
198
197
}
199
198
Catch {
200
199
$Failed=$True
201
-
Write-Warning-Message "Unable to get the GitHub Actions resources: Environment path ``$($Condition.Name)`` is undefined or not equal to expected value!"
0 commit comments