g-plane / zsh-yarn-autocompletions

Zsh plugin for Yarn autocompletions.
MIT License
578 stars 18 forks source link

Check for existence of ZSH plugins directory in install script before copying files #9

Closed josh- closed 6 years ago

josh- commented 6 years ago

Hey there 👋 Thanks for an awesome project!

It's working perfectly for me, however I noticed a quick little issue in the install process – when running the install.sh script without a plugins directory parameter, the script will attempt to write to /. I've added some quick validation to ensure that the user has passed in a parameter before attempting the copy.

Previously:

$ ./install.sh 
mkdir: /yarn-autocompletions: Permission denied
cp: /yarn-autocompletions: Permission denied
cp: /yarn-autocompletions: Permission denied

Now:

$ ./install.sh 
Plugins directory not specified, please pass your zsh plugins directory as a parameter.

Thanks again! 🌟