Skip to content

Commit 0fbc95e

Browse files
committed
Better secret mask chunks
1 parent 2593e3f commit 0fbc95e

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
@@ -249,8 +249,8 @@ function Add-GitHubActionsSecretMask {
249249
Write-GitHubActionsCommand -Command 'add-mask' -Message $Value
250250
}
251251
if ($WithChunks) {
252-
[string[]]($Value -split '[\n\r\s\t]+') | ForEach-Object -Process {
253-
if ($_ -ne $Value -and $_.Length -ge 2) {
252+
[string[]]($Value -split '[\b\n\r\s\t_-]+') | ForEach-Object -Process {
253+
if ($_ -ne $Value -and $_.Length -gt 2) {
254254
Write-GitHubActionsCommand -Command 'add-mask' -Message $_
255255
}
256256
}

0 commit comments

Comments
 (0)