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
urlscan should read from stderr #122
Comments
In commit 01e4cfb I basically turned off stderr so the extraneous terminal (stderr) output from browsers or xdg-open would not disturb the urlscan display. This happens in urlscan/urlchoose.py (line 754):
I'm interested in keeping stderr suppressed from a usability standpoint. It's typically annoying to have to hit Ctrl-L every time after you open a URL. I actually don't understand how your browser.sh script works! What functionality do you lose if you don't have stderr for this use case? Thanks for your interest! |
Thanks for the quick response. It seems like that code is trying to redirect stderr to The The second example is just demonstrating that my script fails after the It’s not that I lose functionality, but that it was a rather unexpected failure and took a while to debug. I am fine with stderr going to |
Please give the develop branch a try. I changed how the redirection of |
Fantastic, that works. Will let you know if anything breaks. I also have to say that I love this tool and I appreciate your work on it. Thank you! I'll let you decide if this should be closed now or when the change is merged into main. |
Thanks for the kind words! |
I use a shell script as my
$BROWSER
to launch my actual browser. My script writes to stderr; when invoked through urlscan, it seems stderr is not writable:browser.sh
:Writing to stderr returns a non-zero exit code, and since my script uses bash's
-e
(errexit) option, it crashes.Reproduction:
If you look at /tmp/browser-out, the expected contents would be...
...but the actual contents are...
If I just don't write to stderr, everything works fine, but this seems like a bug and it took me a while to figure out what was going on. I think urlscan should either pipe stderr to the terminal or to
/dev/null
.The text was updated successfully, but these errors were encountered: