File tree 1 file changed +9
-7
lines changed
Basic/DynamicParam/Dynamic-switch-parameter
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
1
# Dynamic switch parameter
2
2
3
- Dynamic switches specified before positional parameter arguments with omitted
4
- parameter names swallow these arguments and make a command invalid, either due
5
- to incorrect syntax or shifted arguments. In the latter case a command may even
6
- work without errors with incorrect input parameters.
3
+ Dynamic switches specified before positional parameters with omitted names
4
+ affect positional arguments and make commands invalid, either due to incorrect
5
+ syntax or shifted arguments. Note, commands may even work without errors with
6
+ incorrectly treated parameters.
7
7
8
8
Workarounds
9
9
10
- - Specify dynamic switches with values ` -ReadOnly:$true ` .
11
- - Or specify dynamic switches after positional parameters.
12
- - Or do not omit parameter names of positional parameters.
10
+ - Specify dynamic switches after positional parameters.
11
+ - Do not omit parameter names of positional parameters.
12
+
13
+ > Used to work as a workaround, not working anymore in the latest v5.1+
14
+ > - Specify dynamic switches with values ` -ReadOnly:$true ` .
13
15
14
16
Scripts
15
17
You can’t perform that action at this time.
0 commit comments