antfu-collective / ni

💡 Use the right package manager
MIT License
6.25k stars 208 forks source link

Feature Request: work better with nvm lazy load script #208

Open cnwangjie opened 4 months ago

cnwangjie commented 4 months ago

Clear and concise description of the problem

I'm using zsh-nvm-plugin with oh-my-zsh. It makes the yarn / pnpm as a shell function, so that we don't need to initialize nvm when we initialize the zsh.

And when I use ni in a new shell. It'll display following message:

[ni] Detected yarn but it doesn't seem to be installed. ✖ Would you like to globally install yarn (​https://classic.yarnpkg.com/en/docs/install​)? …

or

[ni] Detected pnpm but it doesn't seem to be installed.

I don't know what's the behaviour if I accept it. But I really want ni could recognize the shell function wrapper.

Suggested solution

I have no idea about how ni to recognize the package manager installation situation. But I think using the type command to detect this is a workaround.

Alternative

No response

Additional context

No response

Validations