bigbinary / wheel

Don't reinvent the wheel for every new Rails project. Use sane Defaults.
https://wheel-production.neetodeployapp.com
MIT License
254 stars 197 forks source link

Quote $0 in githooks. #546

Closed Amaljith-K closed 3 years ago

Amaljith-K commented 3 years ago

Add quotes to command line argument $0 in pre-commit and pre-push hooks https://github.com/bigbinary/wheel/blob/master/.husky/pre-commit#L2-L4

https://github.com/bigbinary/wheel/blob/master/.husky/pre-push#L2-L3

Expected way:

. "$(dirname "$0")/_/husky.sh"

If the parent folder contains spaces, the argument will split into two and dirname will get two arguments instead of one.

This won't be of much priority since here the parent folder is always .husky. But in case, this command is reused in some other folder containing spaces in its name, the command will fail.

yedhink commented 3 years ago

Closed via #548