Skip to content

Don't create a 'null' file - #211

Closed
eugenesvk wants to merge 1 commit into
ntdevlabs:mainfrom
eugenesvk:null
Closed

Don't create a 'null' file#211
eugenesvk wants to merge 1 commit into
ntdevlabs:mainfrom
eugenesvk:null

Conversation

@eugenesvk

Copy link
Copy Markdown

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

Spadium added a commit to Spadium/tiny11builder that referenced this pull request Jun 29, 2024
…xed an incorrect parameter warning when unmounting registry, prompt to delete old ISO, extract chosen edition from `install.wim` earlier than stock, use ScratchDisk instead of SystemDrive, add `.gitignore`
@R-udren

R-udren commented Aug 10, 2024

Copy link
Copy Markdown

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

R-udren commented Aug 11, 2024

Copy link
Copy Markdown

This should work.

@eugenesvk

Copy link
Copy Markdown
Author

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

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

@R-udren

R-udren commented Aug 11, 2024

Copy link
Copy Markdown

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

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

@Karl-WE

Karl-WE commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

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

@Karl-WE Karl-WE left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please search and replace
> null
>null
> $null

with

| Out-Null

@Karl-WE

Karl-WE commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

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

Karl-WE commented Nov 18, 2024

Copy link
Copy Markdown
Contributor

@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

Karl-WE commented Feb 17, 2025

Copy link
Copy Markdown
Contributor

/please-close @eugenesvk

@eugenesvk eugenesvk closed this Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants