Skip to content

Commit 5b3ee80

Browse files
committed
style: add ValidateNotNullOrEmpty to build.ps1 -Task parameter
Matches the canonical template (PowerShellModuleTemplate#23). Without the validator, `./build.ps1 -Task ''` and `./build.ps1 -Task $null` slip past parameter binding and produce confusing downstream errors from psake. The validator surfaces the misuse immediately.
1 parent 1af7c2c commit 5b3ee80

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

build.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ param(
4040
@()
4141
}
4242
})]
43+
[ValidateNotNullOrEmpty()]
4344
[string[]]$Task = 'default',
4445

4546
# Bootstrap dependencies

0 commit comments

Comments
 (0)