Using yarn I installed tabtab and yarn-completions globally:
$ sudo yarn global add tabtab
$ sudo yarn global add yarn-completions
Now you can see:
$ ll /usr/local/share/.config/yarn/global/node_modules/tabtab/.completions/
total 16K
-rw-r--r--. 1 root root 714 Oct 9 2016 gitbook.bash
-rw-r--r--. 1 root root 440 Oct 9 2016 gitbook.fish
-rw-r--r--. 1 root root 389 Oct 10 2016 gitbook.zsh
-rw-r--r--. 1 root root 696 May 25 16:16 yarn.bash
However, when I do sudo yarn global ls afterwards the installed yarn.bash disappears!!!
$ sudo yarn global ls
yarn global v0.24.5
warning No license field
info "tabtab@2.2.2" has binaries:
- tabtab
info "yarn-completions@0.0.8" has binaries:
- completions-yarn
Done in 1.22s.
$ ll /usr/local/share/.config/yarn/global/node_modules/tabtab/.completions/
total 12K
-rw-r--r--. 1 root root 714 Oct 9 2016 gitbook.bash
-rw-r--r--. 1 root root 440 Oct 9 2016 gitbook.fish
-rw-r--r--. 1 root root 389 Oct 10 2016 gitbook.zsh
It happens on both CentOS 7 (via yum repo / with sudo) and macOS (via brew / without sudo).
Using
yarn
I installedtabtab
andyarn-completions
globally:Now you can see:
However, when I do
sudo yarn global ls
afterwards the installedyarn.bash
disappears!!!It happens on both CentOS 7 (via yum repo / with
sudo
) and macOS (via brew / withoutsudo
).