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

duplicate error messages in redirects #2035

Open
andychu opened this issue Jul 28, 2024 · 1 comment
Open

duplicate error messages in redirects #2035

andychu opened this issue Jul 28, 2024 · 1 comment

Comments

@andychu
Copy link
Contributor

andychu commented Jul 28, 2024

This came up on the noclobber PR #2008, but it isn't specific to noclobber

$ bin/osh -c 'echo hi > /zz'
  echo hi > /zz
          ^
[ -c flag ]:1: Can't open '/zz': Permission denied
[ -c flag ]:1: I/O error applying redirect: Permission denied
@andychu
Copy link
Contributor Author

andychu commented Jul 28, 2024

There are also cases like this

$ bin/ysh -c ' var b = ^(echo hi >/zz); cd /tmp (; ; b)'
   var b = ^(echo hi >/zz); cd /tmp (; ; b)
                     ^
[ -c flag ]:1: Can't open '/zz': Permission denied
[ -c flag ]:1: I/O error applying redirect: Permission denied
[ -c flag ]:1: errexit PID 4006908: command.Redirect failed with status 1

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

No branches or pull requests

1 participant