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

zimfw upgrade messages #360

Closed
cattyhouse opened this issue Jan 9, 2020 · 4 comments
Closed

zimfw upgrade messages #360

cattyhouse opened this issue Jan 9, 2020 · 4 comments

Comments

@cattyhouse
Copy link

i got these messages when running zimfw upgrade on some of my machines, what does it mean to my system?

# macOS 10.15.2
2020-01-09 22:37:43 URL:https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh [14318/14318] -> "$HOME/.zim/zimfw.zsh.new" [1]

# Archlinux

Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
2020-01-09 22:38:23 URL:https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh [14318/14318] -> "$HOME/.zim/zimfw.zsh.new" [1]

while on another archlinux box, i don't get these messages. all zimfw are newly installed via curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh

@cattyhouse
Copy link
Author

cattyhouse commented Jan 9, 2020

found the cause, it is due to wget, _zimfw_upgrade tries to use wget firstly if found, but wget does not give quiet enough output even with zimfw upgrade -q.

functions _zimfw_upgrade

       ...
	if (( ${+commands[wget]} ))
		then
			command wget -nv -O ${ztarget}.new ${zurl} || return 1
       ...

man wget

-nv
       --no-verbose
           Turn off verbose without being completely quiet (use -q for that), which means that error messages and basic information still get

@ericbn
Copy link
Member

ericbn commented Jan 9, 2020

Exactly, and wget -q will also suppress the error messages, which I think is not a good idea. The messages you see are even printed to stderr. I just learned to accept that this is how wget works, and I agree it can be annoying! There are workarounds for this annoyance, but I also want to avoid making the code more complex because of that.

Something I'm considering is adding a -v verbose flag to zimfw. So in this case we can do wget -q unless you're calling zimfw upgrade -v.

@cattyhouse
Copy link
Author

just swap curl and wget, make curl the first choice, on most *nix systems, curl is installed by default.

ericbn added a commit that referenced this issue Jan 11, 2020
so the normal output is focused on the given action, and output for
additional steps perfomed after the given action is only shown in
verbose mode.

Also, the output of wget is only shown in verbose mode. This is because
wget always shows some output (to stderr) even when there are no errors.
See https://serverfault.com/q/70889/302338

This should give a friendlier output.
See #360
@ericbn ericbn closed this as completed in 65d7f6d Jan 11, 2020
ericbn added a commit to zimfw/install that referenced this issue Jan 12, 2020
Same change was done for `zimfw upgrade`. See zimfw/zimfw#360

`wget` gives some extra output that can be confusing.
See https://serverfault.com/q/70889/302338
@lnicola

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants