-
Notifications
You must be signed in to change notification settings - Fork 889
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
shouldn't install script be quiet? #3350
Comments
Isn't most of those indicates error or some kind of warnings? I'm only against the |
Sounds reasonable to make sure more of the |
would love to, I'll do the PR asap |
To clarify the desired outcome of this cleanup:
|
Not sure I understand that. And implementing I'll make some tests in the couple of days (hopefully this weekend) and come back with a diff so we can all agree before submitting the PR. |
@vic1707 Thanks for your reply! Don't get me wrong, the point here is that in When I said
I meant when the script logic was still running. You'd expect |
ok I think I get it, feels a bit odd not gonna lie, but makes sense and that's the most important 👍. |
Just had fun implementing it here. But I sincerely thought/hoped that way less thing would get printed out, in fact it doesn't change anything apart from
being silenced (on the happy path). So, imo, while the implementation of the My issue was opened as I hoped in the end the happy path of rust's installation would output nothing at all when |
@vic1707 Thanks! I'd still love to see a PR from this so that we can unify the output style across the script.
That's exactly what I'd expect from this change.
Putting the logs into
Currently it's just preventing the progress bar from appearing, otherwise it could be potentially problematic in CI logs for example.
This has become possible after #3875 by setting both |
@djc I think there could potentially be a coherence issue here, as currently > rustup-init --help
rustup-init 1.27.1+291 (6eb71e956 2024-06-22)
The installer for rustup
Usage: rustup-init[EXE] [OPTIONS]
Options:
-v, --verbose Enable verbose output
-q, --quiet Disable progress output
[..] ... so that a functionality like |
I think it would be fine to make |
Done ✅ , don't know if I should have put more than a link to this issue tho.
Ok didn't know that, thx for the informations ^^
just made some tests with a master build of rustup-init and it gives the following output
Which still looks like a lot of logs for a |
@vic1707 Thanks for your PR! I guess I'll evaluate the potential cleanup as mentioned in #3350 (comment) (split into #3900). |
Problem you are trying to solve
Hello,
I'm currently working on some installation scripts and I'd like to install rust somewhat silently (or at least restrict the output to only errors).
I found the
-q|--quiet
option in the script but it doesn't affect the script itself, onlyrustup
as far as I understand.All
printf
andecho
lines in the script are postfixed with1>&2
which redirectstdout
tostderr
even though the script has dedicatedsay
anderr
function.By doing so we are completely unable to only allow errors to be printed out and the
-q|--quiet
doesn't do what its name suggests.We are also unable to bypass this restriction by setting
1>/dev/null
ourselves.Solution you'd like
I think the best solution would be apply the
-q|--quiet
flag to the install script.Another solution would be to let
stdout
be what it is instead of redirecting it tostderr
(removing most of the1>&2
inside the script).At least I'd like to see some sort of warning/message in the
--help
section of the script.Notes
English isn't my primary language, I'm sorry if I made mistakes or if anything sounds bad.
Tasks
rustup-init.sh
#3910LevelFilter::Warn
forstderr
if-q
is present inrustup-init
#3900The text was updated successfully, but these errors were encountered: