We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8986d17 commit f9e4c12Copy full SHA for f9e4c12
1 file changed
Plaster/InvokePlaster.ps1
@@ -547,12 +547,15 @@ function Invoke-Plaster {
547
$value = Read-Host -Prompt $prompt
548
if (!$value -and $default) {
549
$value = $default
550
+ $patternMatch = $true
551
}
-
552
- if ($pattern) {
+ elseif ($value -and $pattern) {
553
if ($value -match $pattern) {
554
$patternMatch = $true
555
556
+ else {
557
+ $PSCmdlet.WriteDebug("Value '$value' did not match the pattern '$pattern'")
558
+ }
559
560
} while (!$value -or !$patternMatch)
561
0 commit comments