Skip to content

Commit f539e58

Browse files
committed
Add Write-Fail safe net
1 parent b632716 commit f539e58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hugoalh.GitHubActionsToolkit/module/parameter.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ Function Get-Input {
6363
If ($Null -ieq $InputValueRaw) {
6464
If ($Mandatory.IsPresent) {
6565
Write-GitHubActionsFail -Message ($MandatoryMessage -f $Name)
66-
Return
66+
Throw
6767
}
6868
Return $Null
6969
}
7070
[String]$InputValue = $Trim.IsPresent ? $InputValueRaw.Trim() : $InputValueRaw
7171
If ($EmptyStringAsNull.IsPresent -and $InputValue.Length -ieq 0) {
7272
If ($Mandatory.IsPresent) {
7373
Write-GitHubActionsFail -Message ($MandatoryMessage -f $Name)
74-
Return
74+
Throw
7575
}
7676
Return $Null
7777
}

0 commit comments

Comments
 (0)