tiny11builder
tiny11builder copied to clipboard
Don't create a 'null' file
As far as I understand, the proper way is to redirect to $null, otherwise currently the script creates an actual null file
This one didn't worked for me.
Version of PowerShell: 7.4.4
ParserError: D:\tiny11maker.ps1:45
Line |
45 | … ItemType Directory -Force -Path "$ScratchDisk\tiny11\sources" > &null
| ~
| Missing file specification after redirection operator.
ParserError: D:\tiny11maker.ps1:45
Line |
45 | … -ItemType Directory -Force -Path "$ScratchDisk\tiny11\sources" >&null
| ~
| Missing file specification after redirection operator.
This should work.
45 | … ItemType Directory -Force -Path "$ScratchDisk\tiny11\sources" > &null
where is &null from when this PR replaces with $null?
where is
&null fromwhen this PR replaces with$null?
oohh.. my bad.
Anyway | Out-Null should work too
tested even shell commands like reg /? | Out-Null will omit output except errors @eugenesvk
The reason why the script creates a file "null" is that the cmd command for Out-Null is in fact > nul and not > null
@eugenesvk this one can be closed. @ntdevlabs Solved with #268
Please watch out, open PRs do not overwrite the changes by Re-adding nul /null commands.
/please-close @eugenesvk