diff --git a/index.js b/index.js index 5b1b08942..29966479f 100644 --- a/index.js +++ b/index.js @@ -28,6 +28,6 @@ export default (d = '.husky') => { f.mkdirSync(_(), { recursive: true }) w(_('.gitignore'), '*') f.copyFileSync(new URL('husky', import.meta.url), _('h')) - l.forEach(h => w(_(h), `#!/usr/bin/env sh\n. "\${0%/*}/h"`, { mode: 0o755 })) + l.forEach(h => w(_(h), `#!/usr/bin/env sh\n. "\$(dirname "\$0")/h"`, { mode: 0o755 })) return '' } \ No newline at end of file