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 allow save command to save both stdout and stderr to the same file #9368

Merged
merged 7 commits into from Jun 10, 2023

Conversation

WindSoilder
Copy link
Collaborator

Description

It's not a good idea to save stdout and stderr to the same file from save command directly.

Because it saves stdout and stderr in different thread, which leads to in-consistent output. As replace, we can use o+e redirection to fix the issue

User-Facing Changes

❯ do -i { "aa" } | save foo.txt -e foo.txt
Error:   × input and stderr input to same file
   ╭─[entry #3:1:1]
 1 │ do -i { "aa" } | save foo.txt -e foo.txt
   ·                                  ───┬───
   ·                                     ╰── can't save both input and stderr input to the same file
   ╰────
  help: you should use `o+e> file` instead

Tests + Formatting

After Submitting

@WindSoilder WindSoilder added the pr:breaking-change This PR implies a change affecting users and has to be noted in the release notes label Jun 6, 2023
@amtoine
Copy link
Member

amtoine commented Jun 9, 2023

@WindSoilder
this ratatouille typo issue should have been addressed in bdb09a9, could you try to merge again the main branch in here to see if the CI passes again? 😋

maybe we'll have to ping a few other PRs if that's the way to make the CI green again 😮

EDIT: maybe this won't be enough, see #9393

@WindSoilder
Copy link
Collaborator Author

@amtoine Thank you for typo fixing!

Copy link
Member

@amtoine amtoine left a comment

Choose a reason for hiding this comment

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

looks good to me and sensible, thanks @WindSoilder 😊

@amtoine amtoine merged commit 5afd74f into nushell:main Jun 10, 2023
16 checks passed
@amtoine
Copy link
Member

amtoine commented Jun 10, 2023

@amtoine Thank you for typo fixing!

😊

yeah the CI was a bit capricious these days 👀 😆

@WindSoilder WindSoilder deleted the restrict_save branch June 10, 2023 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:breaking-change This PR implies a change affecting users and has to be noted in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants