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 (![System.IO.Path]::IsPathFullyQualified($FileCommandPath)) {
88
-
Throw
89
-
}
90
87
}
91
88
Catch {
92
89
Write-Error-Message "Unable to write the GitHub Actions file command: Environment path ``$($FileCommand.ToUpper())`` is not defined!"-Category 'ResourceUnavailable'
93
90
Return
94
91
}
92
+
If (![System.IO.Path]::IsPathFullyQualified($FileCommandPath)) {
93
+
Write-Error-Message "Unable to write the GitHub Actions file command: Environment path ``$($FileCommand.ToUpper())`` is not contain a valid file path!"-Category 'ResourceUnavailable'
If ([String]::IsNullOrEmpty((Get-Content-LiteralPath "Env:\$($Condition.Name)"-ErrorAction 'SilentlyContinue'))) {
189
-
Throw"Unable to get the GitHub Actions resources: Environment path ``$($Condition.Name)`` is not defined!"
190
-
}
191
-
}
192
-
Else {
193
-
If ((Get-Content-LiteralPath "Env:\$($Condition.Name)"-ErrorAction 'SilentlyContinue') -ine$Condition.ExpectedValue) {
194
-
Throw"Unable to get the GitHub Actions resources: Environment path ``$($Condition.Name)`` is not defined or not equal to expected value!"
195
-
}
186
+
If ($Null-ieq$Condition.ExpectValue) {
187
+
If ([String]::IsNullOrEmpty((Get-Content-LiteralPath "Env:\$($Condition.Name)"-ErrorAction 'SilentlyContinue'))) {
188
+
$Failed=$True
189
+
Write-Warning-Message "Unable to get the GitHub Actions resources: Environment path ``$($Condition.Name)`` is not defined!"
196
190
}
197
191
}
198
-
Catch {
199
-
$Failed=$True
200
-
Write-Warning-Message $_
192
+
Else {
193
+
If ((Get-Content-LiteralPath "Env:\$($Condition.Name)"-ErrorAction 'SilentlyContinue') -ine$Condition.ExpectValue) {
194
+
$Failed=$True
195
+
Write-Warning-Message "Unable to get the GitHub Actions resources: Environment path ``$($Condition.Name)`` is not defined or not equal to expect value!"
0 commit comments