diff --git a/assets/inject/semver-workflow/.husky/commit-msg b/assets/inject/semver-workflow/.husky/commit-msg index fa859b0d..62c6868f 100755 --- a/assets/inject/semver-workflow/.husky/commit-msg +++ b/assets/inject/semver-workflow/.husky/commit-msg @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - npx --no -- commitlint --edit "" diff --git a/assets/inject/semver-workflow/.husky/pre-commit b/assets/inject/semver-workflow/.husky/pre-commit index 36af2198..2312dc58 100755 --- a/assets/inject/semver-workflow/.husky/pre-commit +++ b/assets/inject/semver-workflow/.husky/pre-commit @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - npx lint-staged diff --git a/src/presets/semver-workflow.ts b/src/presets/semver-workflow.ts index 1b48d16a..19d4709d 100644 --- a/src/presets/semver-workflow.ts +++ b/src/presets/semver-workflow.ts @@ -42,7 +42,7 @@ async function applyPreset(options: InjectOptions) { async function addPrepareScript(options: InjectOptions) { const pkg = await getPackage(options) const didWrite = await addPackageJsonScripts(pkg, options, (scripts) => { - scripts.prepare = addScript(`husky install`, scripts.prepare) + scripts.prepare = addScript(`husky`, scripts.prepare) return scripts }) info(didWrite, 'Added prepare script to package.json') diff --git a/test/init.test.ts b/test/init.test.ts index 49d75157..d843c3df 100644 --- a/test/init.test.ts +++ b/test/init.test.ts @@ -230,7 +230,7 @@ tap.test('plugin-kit init --force --preset semver-workflow in empty directory', 'should have expected devDependencies', ) - t.strictSame(pkg.scripts?.prepare, 'husky install') + t.strictSame(pkg.scripts?.prepare, 'husky') }, }) })