Open sharh opened 7 months ago
1.1.6
Microsoft Windows NT 10.0.19045.0 x64
# bun init bun init # install deps bun install -d @commitlint/config-conventional @commitlint/cli husky # init git git init -b dev # init git hook bunx husky init
bunx husky init not works well:
bunx husky init
when change to npx, it works well as the above picture presents.
npx
# huasky init npx husky init # commit lint echo npx --no -- commitlint --edit $1 > .husky/commit-msg
# git commit lint git commit -am 'test'
while use bun install the deps,the @commitlint/cli not works with husky git hook npx --no -- commitlint --edit $1
bun install
@commitlint/cli
husky
npx --no -- commitlint --edit $1
infact, the command commitlint is installed in node_modules/.bin diretory:
commitlint
node_modules/.bin
when I change the git hook to: bunx --no -- commitlint --edit $1 it works:
bunx --no -- commitlint --edit $1
when use npm install -D @commitlint/config-conventional @commitlint/cli husky,this can be work well:
npm install -D @commitlint/config-conventional @commitlint/cli husky
both bunx and npx can work well:
bunx
I hope bun install can works well as npm install
npm install
bun install -d @commitlint/config-conventional @commitlint/cli husky bunx husky init
npm install -D @commitlint/config-conventional @commitlint/cli husky npx husky init
bunx should works well as npx
No response
Bump.
I have the same issue here, trying to use bunx in the pre-commit hook with husky.
pre-commit
I'm trying to run
bunx tsc --noEmit bunx lint-staged
But I get always as an error bunx: command not found
bunx: command not found
What version of Bun is running?
1.1.6
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
bunx husky init
not works well:when change to
npx
, it works well as the above picture presents.while use
bun install
the deps,the@commitlint/cli
not works withhusky
git hooknpx --no -- commitlint --edit $1
infact, the command
commitlint
is installed innode_modules/.bin
diretory:when I change the git hook to:
bunx --no -- commitlint --edit $1
it works:when use
npm install -D @commitlint/config-conventional @commitlint/cli husky
,this can be work well:both
bunx
andnpx
can work well:What is the expected behavior?
I hope
bun install
can works well asnpm install
bunx
should works well asnpx
What do you see instead?
No response
Additional information
No response