Skip to content

Commit ef4fade

Browse files
authored
style: add ValidateNotNullOrEmpty to build.ps1 -Task parameter (#41)
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 c2bebb1 commit ef4fade

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)