zimfw/install

Output errors in installation script

Closed this issue · 5 comments

The install script doesn't seem to get the home folder parameters right:

✓ Downloaded the Zim script to ${ZDOTDIR:-${HOME}}/.zim
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/GitHub/Dotfiles/zimrc
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/GitHub/Dotfiles/zshrc
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/GitHub/Dotfiles/zlogin

Functionality seems unimpeded though.

Maybe the changes I did in 1a0c397 (and 229cea0 ) are not fully working. Can you still reproduce this? What are the values of your ZIM_HOME, ZDOTDIR and HOME when you run install?

Here's what I get with:

HOME=/root

✓ ZIM_HOME not set, using the default one.
…
✓ Downloaded the Zim script to ${ZDOTDIR:-${HOME}}/.zim
✓ Copied Zim template to ${ZDOTDIR:-${HOME}}/.zimrc
✓ Copied Zim template to ${ZDOTDIR:-${HOME}}/.zshrc
✓ Copied Zim template to ${ZDOTDIR:-${HOME}}/.zlogin

HOME=/root ZDOTDIR=/root/GitHub/Dotfiles

✓ ZIM_HOME not set, using the default one.
…
✓ Downloaded the Zim script to ${ZDOTDIR:-${HOME}}/.zim
✓ Copied Zim template to ${ZDOTDIR:-${HOME}}/.zimrc
✓ Copied Zim template to ${ZDOTDIR:-${HOME}}/.zshrc
✓ Copied Zim template to ${ZDOTDIR:-${HOME}}/.zlogin

HOME=/root ZIM_HOME=/root/.zimfw

✓ Your ZIM_HOME is customized to ${ZDOTDIR:-${HOME}}/.zimfw
…
✓ Downloaded the Zim script to ${ZDOTDIR:-${HOME}}/.zimfw
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/.zimrc
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/.zshrc
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/.zlogin

HOME=/root ZDOTDIR=/root/GitHub/Dotfiles ZIM_HOME=/root/GitHub/Dotfiles/.zimfw

✓ Your ZIM_HOME is customized to ${ZDOTDIR:-${HOME}}/.zimfw
…
✓ Downloaded the Zim script to ${ZDOTDIR:-${HOME}}/.zimfw
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/.zimrc
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/.zshrc
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/.zlogin

HOME=/root ZDOTDIR=/root/GitHub/Dotfiles ZIM_HOME=/root/.zimproved

✓ Your ZIM_HOME is customized to /root/.zimproved
…
✓ Downloaded the Zim script to /root/.zimproved
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/.zimrc
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/.zshrc
✓ Prepended Zim template to ${ZDOTDIR:-${HOME}}/.zlogin

@PatTheMav, could not reproduce your scenario.

If the output of ${ZDOTDIR:-${HOME}} (instead of the actual value) is indeed intended, then this issue is invalid. 😁

I thought it would be more "user friendly" to show it this way. Plus the install sets the ZIM_HOME in .zshrc with this format.

If this proves to be a bad idea, I'll revert it.

Indeed, printing the full paths instead of trying to be "smart" is clearer. I fixed this in 8ae3a5d.