Skip to content

Commit 2321bb9

Browse files
committed
Fix incorrect regular expression
1 parent 0515b18 commit 2321bb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hugoalh.GitHubActionsToolkit/hugoalh.GitHubActionsToolkit.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ function Get-GitHubActionsInput {
634634
}
635635
'suffix' {
636636
Get-ChildItem -Path "Env:\INPUT_*$NameSuffix" | ForEach-Object -Process {
637-
[string]$InputKey = $_.Name -replace 'INPUT_', '' -replace "$([regex]::Escape($NameSuffix))$", ''
637+
[string]$InputKey = $_.Name -replace '^INPUT_', '' -replace "$([regex]::Escape($NameSuffix))$", ''
638638
if ($Trim) {
639639
$OutputObject[$InputKey] = $_.Value.Trim()
640640
} else {
@@ -744,7 +744,7 @@ function Get-GitHubActionsState {
744744
}
745745
'suffix' {
746746
Get-ChildItem -Path "Env:\STATE_*$NameSuffix" | ForEach-Object -Process {
747-
[string]$StateKey = $_.Name -replace 'STATE_', '' -replace "$([regex]::Escape($NameSuffix))$", ''
747+
[string]$StateKey = $_.Name -replace '^STATE_', '' -replace "$([regex]::Escape($NameSuffix))$", ''
748748
if ($Trim) {
749749
$OutputObject[$StateKey] = $_.Value.Trim()
750750
} else {

0 commit comments

Comments
 (0)