Skip to content

Commit e011e76

Browse files
committed
docs: rollback to npx --no-install
1 parent 611630f commit e011e76

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ To add another hook use `husky add`. For example:
3939

4040
```shell
4141
# npm
42-
npx husky add .husky/commit-msg 'npx --no commitlint --edit "$1"'
42+
npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
4343

4444
# yarn
45-
yarn husky add .husky/commit-msg 'npx --no commitlint --edit "$1"'
45+
yarn husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
4646
```
4747

4848
## Manual
@@ -361,7 +361,7 @@ If you were calling directly locally installed binaries, **you need to run them
361361
```shell
362362
# .husky/pre-commit (v5)
363363
# ...
364-
npx --no jest
364+
npx --no-install jest
365365
yarn jest
366366
```
367367

@@ -381,7 +381,7 @@ Previous `HUSKY_GIT_PARAMS` environment variable is replaced by native params `$
381381
```shell
382382
# .husky/commit-msg (v5)
383383
# ...
384-
npx --no commitlint --edit $1
384+
npx --no-install commitlint --edit $1
385385
# or
386386
yarn commitlint --edit $1
387387
```

test/config-dir.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ cd_and_install_tgz $tempDir
1414
mkdir $configDir
1515

1616
init_git
17-
npx --no husky install .config/husky
18-
npx --no husky add .config/husky/pre-commit "echo \"msg from pre-commit hook\" && exit 1"
17+
npx --no-install husky install .config/husky
18+
npx --no-install husky add .config/husky/pre-commit "echo \"msg from pre-commit hook\" && exit 1"
1919

2020
# Debug
2121
# cat .husky/*

test/default.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ rm -rf $tempDir
1010
cd_and_install_tgz $tempDir
1111

1212
init_git
13-
npx --no husky install
14-
npx --no husky add .husky/pre-commit "echo \"msg from pre-commit hook\" && exit 1"
13+
npx --no-install husky install
14+
npx --no-install husky add .husky/pre-commit "echo \"msg from pre-commit hook\" && exit 1"
1515

1616
# Debug
1717
# cat .husky/*
@@ -24,5 +24,5 @@ git add package.json
2424
git commit -m "should fail" || echo -e "\e[0;32mOK\e[m"
2525

2626
# Uninstall
27-
npx --no husky uninstall
27+
npx --no-install husky uninstall
2828
git config core.hooksPath || echo -e "\e[0;32mOK\e[m"

test/init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ rm -rf $tempDir
1010
cd_and_install_tgz $tempDir
1111

1212
init_git
13-
npx --no husky init
13+
npx --no-install husky init
1414
npm set-script test "echo \"msg from pre-commit hook\" && exit 1"
1515

1616

@@ -28,5 +28,5 @@ git add package.json
2828
git commit -m "should fail" || echo -e "\e[0;32mOK\e[m"
2929

3030
# Uninstall
31-
npx --no husky uninstall
31+
npx --no-install husky uninstall
3232
git config core.hooksPath || echo -e "\e[0;32mOK\e[m"

test/not-git-dir.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ rm -rf $tempDir
1010
cd_and_install_tgz $tempDir
1111

1212
# Should not fail
13-
npx --no husky install && echo -e "\e[0;32mOK\e[m"
13+
npx --no-install husky install && echo -e "\e[0;32mOK\e[m"

test/sub-dir.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ EOL
3030
npm run postinstall
3131

3232
# Add hook
33-
npx --no husky add pre-commit "echo \"msg from pre-commit hook\" && exit 1"
33+
npx --no-install husky add pre-commit "echo \"msg from pre-commit hook\" && exit 1"
3434

3535
# Debug
3636
# cat .husky/*

0 commit comments

Comments
 (0)