tiny11builder icon indicating copy to clipboard operation
tiny11builder copied to clipboard

Don't create a 'null' file

Open eugenesvk opened this issue 1 year ago • 7 comments

As far as I understand, the proper way is to redirect to $null, otherwise currently the script creates an actual null file

eugenesvk avatar Jun 24 '24 12:06 eugenesvk

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.

R-udren avatar Aug 10 '24 21:08 R-udren

This should work.

R-udren avatar Aug 11 '24 09:08 R-udren

45 | … ItemType Directory -Force -Path "$ScratchDisk\tiny11\sources" > &null

where is &null from when this PR replaces with $null?

eugenesvk avatar Aug 11 '24 09:08 eugenesvk

where is &null from when this PR replaces with $null?

oohh.. my bad. Anyway | Out-Null should work too

R-udren avatar Aug 11 '24 10:08 R-udren

tested even shell commands like reg /? | Out-Null will omit output except errors @eugenesvk

Karl-WE avatar Nov 06 '24 22:11 Karl-WE

The reason why the script creates a file "null" is that the cmd command for Out-Null is in fact > nul and not > null

Karl-WE avatar Nov 06 '24 22:11 Karl-WE

@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.

Karl-WE avatar Nov 18 '24 12:11 Karl-WE

/please-close @eugenesvk

Karl-WE avatar Feb 17 '25 14:02 Karl-WE