Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't create a 'null' file #211

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

eugenesvk
Copy link

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
Copy link

R-udren commented Aug 10, 2024

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
Copy link

R-udren commented Aug 11, 2024

This should work.

@eugenesvk
Copy link
Author

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

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

@R-udren
Copy link

R-udren commented Aug 11, 2024

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

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

@Karl-WE
Copy link
Contributor

Karl-WE commented Nov 6, 2024

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

Copy link
Contributor

@Karl-WE Karl-WE left a comment

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
Copy link
Contributor

Karl-WE commented Nov 6, 2024

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
Copy link
Contributor

Karl-WE commented Nov 18, 2024

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

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