Git Product home page Git Product logo

Comments (8)

ixti avatar ixti commented on June 6, 2024

Got the problem. I use zsh and you are calling $SHELL in some places.
The quickiest workaround for me:

$ mkdir -p $HOME/.local/bin
$ cat > $HOME/.local/bin/nave
#!/bin/sh
SHELL=bash $HOME/.nave/nave.sh $*
^D
$ chmod +x $HOME/.local/bin/nave
$ echo "PATH="$HOME/.local/bin:$PATH" > $HOME/.zshenv

the only limittion - nave use ... in this case "drops" you into BASH

from nave.

isaacs avatar isaacs commented on June 6, 2024

With the linked commit, nave now only ever spawns bash, so you can probably just update and then remove that shim.

from nave.

jeromegn avatar jeromegn commented on June 6, 2024

Not a deal-breaker, but I'm wondering if there's a way to use zsh with nave.

from nave.

isaacs avatar isaacs commented on June 6, 2024

You can use zsh for your shell, but nave is written in bash. It should play nice, but when you do nave use x.y.z some-command then the some-command is run by bash, not by zsh.

from nave.

jeromegn avatar jeromegn commented on June 6, 2024

I tried running zsh when in the shell (with nave use 0.6.19) and then when I node -v, I get the globally installed node (0.8).

Is there a way to have nave use zsh when using nave use x.y.z (without a command)?

from nave.

isaacs avatar isaacs commented on June 6, 2024

Set up your zshrc to not re-set the PATH environment variable. (Appending to it is fine, but the first entry in PATH should be the one that nave puts there, or else it won't work.)

from nave.

jeromegn avatar jeromegn commented on June 6, 2024

Here's my PATH in my .zshrc:

PATH=./node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:$PATH

I open up a new shell so it's in effect, the I fire nave use 0.6.19 and that opens a bash shell with the right node version. No if I run zsh, I lose the 0.6.19 node version and go back to 0.8.

What am I doing wrong?

Thanks a lot for taking the time to troubleshoot this with me.

from nave.

isaacs avatar isaacs commented on June 6, 2024

Change that to this:

PATH=$PATH:./node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

Nave prepends to the PATH. Then you are prepending node's main location on TOP of that, which overrides it. Don't do that.

from nave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.