Comparing version 4.2.3 to 4.2.4
@@ -9,3 +9,10 @@ #!/usr/bin/env node | ||
message(requiredVersion) { | ||
return 'Husky requires Node ' + requiredVersion + ", can't run Git hook." | ||
return ( | ||
'Husky requires Node ' + | ||
requiredVersion + | ||
' (runtime: ' + | ||
process.version + | ||
')' + | ||
", can't run Git hook." | ||
) | ||
} | ||
@@ -12,0 +19,0 @@ }) |
# CHANGELOG | ||
Changes for 3.0.0+ can now be found in https://github.com/typicode/husky/releases | ||
β οΈ __Changes for `>=3` can now be found in https://github.com/typicode/husky/releases__ | ||
@@ -5,0 +5,0 @@ ## 3.0.0 |
@@ -13,2 +13,3 @@ /* eslint-disable */ | ||
requiredVersion + | ||
' (runtime: ' + process.version + ')' + | ||
', skipping Git hooks installation.' | ||
@@ -15,0 +16,0 @@ ) |
@@ -19,4 +19,7 @@ "use strict"; | ||
function removeLocalScript(gitHooksDir) { | ||
fs.unlinkSync(path.join(gitHooksDir, 'husky.local.sh')); | ||
const filename = path.join(gitHooksDir, 'husky.local.sh'); | ||
if (fs.existsSync(filename)) { | ||
fs.unlinkSync(filename); | ||
} | ||
} | ||
exports.removeLocalScript = removeLocalScript; |
@@ -20,4 +20,7 @@ "use strict"; | ||
function removeMainScript(gitHooksDir) { | ||
fs.unlinkSync(path.join(gitHooksDir, 'husky.sh')); | ||
const filename = path.join(gitHooksDir, 'husky.sh'); | ||
if (fs.existsSync(filename)) { | ||
fs.unlinkSync(filename); | ||
} | ||
} | ||
exports.removeMainScript = removeMainScript; |
@@ -32,4 +32,3 @@ "use strict"; | ||
console.log(`husky > ${hookName} (node ${process.version})`); | ||
const SHELL = process.env.SHELL || 'sh'; | ||
const { status } = child_process_1.spawnSync(SHELL, ['-c', cmd], { | ||
const { status } = child_process_1.spawnSync('sh', ['-c', cmd], { | ||
cwd, | ||
@@ -36,0 +35,0 @@ env: Object.assign(Object.assign({}, process.env), env), |
{ | ||
"name": "husky", | ||
"version": "4.2.3", | ||
"version": "4.2.4", | ||
"description": "Prevents bad commit or push (git hooks, pre-commit/precommit, pre-push/prepush, post-merge/postmerge and all that stuff...)", | ||
@@ -5,0 +5,0 @@ "bin": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
50606
616
13