zsh-users / antigen

The plugin manager for zsh.
http://antigen.sharats.me
MIT License
8.02k stars 279 forks source link

Antigen tries to install plugins to root when logged in to root first #692

Open lrustand opened 5 years ago

lrustand commented 5 years ago

Description

When I log in to the root user (with zsh and antigen) and then su to my user antigen tries to install all my plugins to /root. If I su to my user from bash or log in to that user directly it correctly finds my .antigen folder and all the installed plugins.

Steps to reproduce

Minimal steps to reproduce this behavior. Example:

1 - Log in as root (with zsh shell and antigen loaded)
2 - Su to a different user which also uses zsh and antigen
3 - Antigen tries to install the user's plugins to /root

Expected behavior:

- Everything works correctly

Software version

More information

[19:15, 14/10/19]
root@i7 [/] -> su lars
mkdir: cannot create directory ‘/root’: Permission denied
mkdir: cannot create directory ‘/root’: Permission denied
Installing robbyrussell/oh-my-zsh... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing robbyrussell/oh-my-zsh... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing robbyrussell/oh-my-zsh... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing robbyrussell/oh-my-zsh... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing robbyrussell/oh-my-zsh... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing zsh-users/zsh-syntax-highlighting... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing knu/zsh-manydots-magic... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing supercrabtree/k... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
Installing zsh-users/zsh-autosuggestions... -antigen-ensure-repo:26: permission denied: /root/.antigen/antigen.log
Error! See "/root/.antigen/antigen.log".
-zcache-generate-cache:45: permission denied: /root/.antigen/.cache/.zcache-payload
-zcache-generate-cache:46: permission denied: /root/.antigen/.cache/.zcache-bundles
zcache-load-cache:source:1: permission denied: /root/.antigen/.cache/.zcache-payload
zsh: command not found: shrink_path
sparcbr commented 4 years ago

Please, update antigen to latest version and see if this issue still occurs.

Could not reproduce this (running v2.2.2)