Skip to content

Commit

Permalink
fix: cnpm fails due to $packgeManager not matched (#687)
Browse files Browse the repository at this point in the history
* fix: cnpm fail cause packgeManager not matched

close #682
close #676
close cnpm/cnpm#318

* test: fix jest snapshot
  • Loading branch information
afc163 authored Apr 9, 2020
1 parent 56c611d commit 4e1d440
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sh/husky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ fi
# Run husky-run with the package manager used to install Husky
case $packageManager in
"npm") run_command npx --no-install;;
"npminstall") run_command npx --no-install;;
"pnpm") run_command pnpx --no-install;;
"yarn") run_command yarn run --silent;;
"*") echo "Unknown package manager: $packageManager"; exit 0;;
*) echo "Unknown package manager: $packageManager"; exit 0;;
esac
3 changes: 2 additions & 1 deletion src/installer/__tests__/__snapshots__/scripts.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ fi
# Run husky-run with the package manager used to install Husky
case $packageManager in
\\"npm\\") run_command npx --no-install;;
\\"npminstall\\") run_command npx --no-install;;
\\"pnpm\\") run_command pnpx --no-install;;
\\"yarn\\") run_command yarn run --silent;;
\\"*\\") echo \\"Unknown package manager: $packageManager\\"; exit 0;;
*) echo \\"Unknown package manager: $packageManager\\"; exit 0;;
esac
"
`;

0 comments on commit 4e1d440

Please sign in to comment.