WhitewaterFoundry / Pengwin

A Linux distro optimized for WSL based on Debian.
Other
1.48k stars 105 forks source link

ZSH as default, Node installs to bash #461

Open jwalsh2me opened 5 years ago

jwalsh2me commented 5 years ago

Describe the bug Installed ZSH as the dafault shell, using pengwin-setup installs tools into bash.

To Reproduce Steps to reproduce the behavior: install zsh via pengwin-setup, set as default install nodjs etc...

Expected behavior node to be added to zsh since it was default

Screenshots Output:

jwalsh2@surprise node --version zsh: command not found: node

✘ jwalsh2@surprise bash jwalsh2@surprise:~$ node --version v12.2.0 jwalsh2@surprise:~$

Additional context

I think that after you install zsh as the default shell, pengwin-setup still assumes you have bash. I have seem similar comments in Issues for FISH.

Biswa96 commented 5 years ago

I tried zsh+nodejs in Ubuntu:

  1. Edit /etc/passwd file:
john:x:1000:1000:,,,:/home/john:/bin/zsh
root:x:0:0:root:/root:/bin/zsh
  1. Command:
#https://github.com/nodesource/distributions/blob/master/README.md
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
apt install nodejs
jwalsh2me commented 5 years ago

Thanks @Biswa96. Agreed if I install nodejs outside of pengwin-setup I do get the expected behavior. I was noting that the problem exists when you use pengwin-setup to install and setup zsh as default, then add other tools they do not always get added to the .zshrc -- looks like some scripts assume .bashrc.

Thanks for testing!

bushidocodes commented 5 years ago

I think this might be a more widespread issue. I recently used pengwin-setup to setup zsh, restarted the shell, and then used pengwin-setup to install python. It seemed to update the bash files just as you describe, so I had to manually modify my zshrc as well.

crramirez commented 5 years ago

This should fix this problem with ZSH and Node:

https://github.com/WhitewaterFoundry/pengwin-setup/pull/167

deanhtid commented 5 years ago

This still doesn't work. I installed zsh and ohmyzsh first. Rebooted the terminal and installed n through pengwin setup and still it adds the path to .bashrc and not zsh

any ideas @crramirez

crramirez commented 5 years ago

We will check following your steps.