Skip to content

Commit 0515b18

Browse files
committed
20220512B
1 parent 9af1bff commit 0515b18

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hugoalh.GitHubActionsToolkit/hugoalh.GitHubActionsToolkit.psm1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,10 @@ function Get-GitHubActionsInput {
609609
break
610610
}
611611
'one' {
612-
$InputValue = Get-ChildItem -Path "Env:\INPUT_$Name" -ErrorAction 'SilentlyContinue'
612+
$InputValue = Get-ChildItem -LiteralPath "Env:\INPUT_$Name" -ErrorAction 'SilentlyContinue'
613613
if ($null -eq $InputValue) {
614614
if ($Require) {
615-
throw "Input ``$Name`` is not defined!"
615+
return Write-GitHubActionsFail -Message "Input ``$Name`` is not defined!"
616616
}
617617
return $null
618618
}
@@ -722,7 +722,7 @@ function Get-GitHubActionsState {
722722
break
723723
}
724724
'one' {
725-
$StateValue = Get-ChildItem -Path "Env:\STATE_$Name" -ErrorAction 'SilentlyContinue'
725+
$StateValue = Get-ChildItem -LiteralPath "Env:\STATE_$Name" -ErrorAction 'SilentlyContinue'
726726
if ($null -eq $StateValue) {
727727
return $null
728728
}
@@ -1052,7 +1052,7 @@ function Test-GitHubActionsEnvironment {
10521052
($null -eq $env:RUNNER_TOOL_CACHE)
10531053
) {
10541054
if ($Require) {
1055-
throw 'This process require to execute inside the GitHub Actions environment!'
1055+
return Write-GitHubActionsFail -Message 'This process require to execute inside the GitHub Actions environment!'
10561056
}
10571057
return $false
10581058
}

0 commit comments

Comments
 (0)