Skip to content

Commit 7f3ed86

Browse files
committed
20230325A
1 parent 575b81a commit 7f3ed86

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

hugoalh.GitHubActionsToolkit/module/command-control.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Function Test-ProcessingCommandsEndToken {
185185
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True)][Alias('Input', 'Object')][String]$InputObject
186186
)
187187
Process {
188-
($InputObject -imatch '^(?:[\da-z][\da-z_-]*)?[\da-z]$') -and ($InputObject.Length -ige 4) -and ($InputObject -inotin $GitHubActionsCommands) |
188+
$InputObject -imatch '^(?:[\da-z][\da-z_-]*)?[\da-z]$' -and $InputObject.Length -ige 4 -and $InputObject -inotin $GitHubActionsCommands |
189189
Write-Output
190190
}
191191
}

hugoalh.GitHubActionsToolkit/module/environment-variable.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ Function Set-EnvironmentVariable {
8686
Process {
8787
If ($PSCmdlet.ParameterSetName -ieq 'Multiple') {
8888
If (
89-
($InputObject -is [Hashtable]) -or
90-
($InputObject -is [System.Collections.Specialized.OrderedDictionary])
89+
$InputObject -is [Hashtable] -or
90+
$InputObject -is [System.Collections.Specialized.OrderedDictionary]
9191
) {
9292
$InputObject.GetEnumerator() |
9393
Set-EnvironmentVariable -NoToUpper:$NoToUpper.IsPresent -Scope $Scope
@@ -124,7 +124,7 @@ Function Test-EnvironmentVariableName {
124124
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True)][Alias('Input', 'Object')][String]$InputObject
125125
)
126126
Process {
127-
($InputObject -imatch '^(?:[\da-z][\da-z_-]*)?[\da-z]$') -and ($InputObject -inotmatch '^(?:CI|PATH)$|^(?:ACTIONS|GITHUB|RUNNER)_') |
127+
$InputObject -imatch '^(?:[\da-z][\da-z_-]*)?[\da-z]$' -and $InputObject -inotmatch '^(?:CI|PATH)$|^(?:ACTIONS|GITHUB|RUNNER)_' |
128128
Write-Output
129129
}
130130
}

hugoalh.GitHubActionsToolkit/module/internal/test-parameter-input-object.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Function Test-ParameterInputObject {
1717
)
1818
Process {
1919
(
20-
($InputObject -is [Hashtable]) -or
21-
($InputObject -is [Object[]]) -or
22-
($InputObject -is [System.Collections.Specialized.OrderedDictionary])
20+
$InputObject -is [Hashtable] -or
21+
$InputObject -is [Object[]] -or
22+
$InputObject -is [System.Collections.Specialized.OrderedDictionary]
2323
) |
2424
Write-Output
2525
}

hugoalh.GitHubActionsToolkit/module/nodejs-wrapper.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ Function Test-NodeJsEnvironment {
152152
[String]$NodeJsVersionStdOut = node --no-deprecation --no-warnings --version |
153153
Join-String -Separator "`n"
154154
If (
155-
($NodeJsVersionStdOut -inotmatch $SemVerRegEx) -or
156-
($NodeJsMinimumVersion -igt [SemVer]::Parse(($Matches[0] -ireplace '^v', '')))
155+
$NodeJsVersionStdOut -inotmatch $SemVerRegEx -or
156+
$NodeJsMinimumVersion -igt [SemVer]::Parse(($Matches[0] -ireplace '^v', ''))
157157
) {
158158
Throw
159159
}

hugoalh.GitHubActionsToolkit/module/parameter.psm1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Function Get-Input {
5757
$InputValueRaw = Get-Content -LiteralPath "Env:\INPUT_$($Name.ToUpper())" -ErrorAction 'SilentlyContinue'
5858
[String]$InputValue = $Trim.IsPresent ? ${InputValueRaw}?.Trim() : $InputValueRaw
5959
If (
60-
($Null -ieq $InputValueRaw) -or
60+
$Null -ieq $InputValueRaw -or
6161
($EmptyStringAsNull.IsPresent -and [String]::IsNullOrEmpty($InputValue))
6262
) {
6363
If ($Mandatory.IsPresent) {
@@ -128,7 +128,7 @@ Function Get-State {
128128
$StateValueRaw = Get-Content -LiteralPath "Env:\STATE_$($Name.ToUpper())" -ErrorAction 'SilentlyContinue'
129129
[String]$StateValue = $Trim.IsPresent ? ${StateValueRaw}?.Trim() : $StateValueRaw
130130
If (
131-
($Null -ieq $StateValueRaw) -or
131+
$Null -ieq $StateValueRaw -or
132132
($EmptyStringAsNull.IsPresent -and [String]::IsNullOrEmpty($StateValue))
133133
) {
134134
Return
@@ -177,8 +177,8 @@ Function Set-Output {
177177
Process {
178178
If ($PSCmdlet.ParameterSetName -ieq 'Multiple') {
179179
If (
180-
($InputObject -is [Hashtable]) -or
181-
($InputObject -is [System.Collections.Specialized.OrderedDictionary])
180+
$InputObject -is [Hashtable] -or
181+
$InputObject -is [System.Collections.Specialized.OrderedDictionary]
182182
) {
183183
$InputObject.GetEnumerator() |
184184
Set-Output
@@ -216,8 +216,8 @@ Function Set-State {
216216
Process {
217217
If ($PSCmdlet.ParameterSetName -ieq 'Multiple') {
218218
If (
219-
($InputObject -is [Hashtable]) -or
220-
($InputObject -is [System.Collections.Specialized.OrderedDictionary])
219+
$InputObject -is [Hashtable] -or
220+
$InputObject -is [System.Collections.Specialized.OrderedDictionary]
221221
) {
222222
$InputObject.GetEnumerator() |
223223
Set-State

hugoalh.GitHubActionsToolkit/module/utility.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Function Add-SecretMask {
2929
Write-GitHubActionsStdOutCommand -StdOutCommand 'add-mask' -Value $Value
3030
If ($WithChunks.IsPresent) {
3131
$Value -isplit '[\b\n\r\s\t -/:-@\[-`{-~]+' |
32-
Where-Object -FilterScript { ($_.Length -ige 4) -and ($_ -ine $Value) } |
32+
Where-Object -FilterScript { $_.Length -ige 4 -and $_ -ine $Value } |
3333
ForEach-Object -Process { Write-GitHubActionsStdOutCommand -StdOutCommand 'add-mask' -Value $_ }
3434
}
3535
}
@@ -50,8 +50,8 @@ Function Get-IsDebug {
5050
[OutputType([Boolean])]
5151
Param ()
5252
(
53-
($Env:RUNNER_DEBUG -ieq '1') -or
54-
($Env:RUNNER_DEBUG -ieq 'true')
53+
$Env:RUNNER_DEBUG -ieq '1' -or
54+
$Env:RUNNER_DEBUG -ieq 'true'
5555
) |
5656
Write-Output
5757
}

0 commit comments

Comments
 (0)