zimfw / install

Zim installer
MIT License
2 stars 8 forks source link

Output errors in installation script #2

Closed PatTheMav closed 4 years ago

PatTheMav commented 5 years ago

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.

ericbn commented 5 years ago

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

ericbn commented 5 years ago

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.

PatTheMav commented 5 years ago

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

ericbn commented 5 years ago

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.

ericbn commented 4 years ago

Indeed, printing the full paths instead of trying to be "smart" is clearer. I fixed this in https://github.com/zimfw/install/commit/8ae3a5d4cf9ff3d199ae654f95efb118d459255b.