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
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
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.
just swap curl and wget, make curl the first choice, on most *nix systems, curl is installed by default.
Stupid question, but how do I update?
zimfw upgrade
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
2020-01-14 00:50:22 URL:https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh [14318/14318] -> "~/.zim/zimfw.zsh.new" [1]
) ~/.zim/zimfw.zsh: Already up to date
Done with upgrade.
) ~/.zim/login_init.zsh: Already up to date
Done with compile.
But I still have:
_zimfw_upgrade() {
local -r ztarget=${ZIM_HOME}/zimfw.zsh
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh
{
if (( ${+commands[wget]} )); then
command wget -nv -O ${ztarget}.new ${zurl} || return 1
else
command curl -fsSL -o ${ztarget}.new ${zurl} || return 1
fi
_zimfw_mv ${ztarget}{.new,} && _zimfw_print -P 'Done with upgrade.'
} always {
command rm -f ${ztarget}.new
}
}
EDIT: Never mind, it's the wrong branch (develop vs. master) :crying_cat_face:.
Most helpful comment
just swap curl and wget, make curl the first choice, on most *nix systems, curl is installed by default.