Comparing version 4.0.7 to 4.0.8
@@ -81,5 +81,6 @@ "use strict"; | ||
if command_exists winpty && test -t 1; then | ||
exec < /dev/tty | ||
fi | ||
case $hookName in | ||
"pre-push"|"pre-receive"|"post-receive"|"post-rewrite") | ||
export HUSKY_GIT_STDIN=\`cat\`;; | ||
esac | ||
@@ -90,3 +91,3 @@ case $packageManager in | ||
"yarn") run_command yarn run --silent;; | ||
"*") echo "Unknow package manager: $packageManager"; exit 0;; | ||
"*") echo "Unknown package manager: $packageManager"; exit 0;; | ||
esac | ||
@@ -93,0 +94,0 @@ `; |
@@ -8,3 +8,2 @@ "use strict"; | ||
const child_process_1 = require("child_process"); | ||
const get_stdin_1 = __importDefault(require("get-stdin")); | ||
const getConf_1 = __importDefault(require("../getConf")); | ||
@@ -58,3 +57,3 @@ const read_pkg_1 = require("../read-pkg"); | ||
*/ | ||
async function run([, , hookName = '', HUSKY_GIT_PARAMS], { cwd = process.cwd(), getStdinFn = get_stdin_1.default } = {}) { | ||
async function run([, , hookName = '', HUSKY_GIT_PARAMS], { cwd = process.cwd() } = {}) { | ||
const oldCommand = getOldCommand(cwd, hookName); | ||
@@ -67,12 +66,2 @@ const command = getCommand(cwd, hookName); | ||
} | ||
// Read stdin and add HUSKY_GIT_STDIN | ||
const hooksWithStdin = [ | ||
'pre-push', | ||
'pre-receive', | ||
'post-receive', | ||
'post-rewrite' | ||
]; | ||
if (hooksWithStdin.includes(hookName)) { | ||
env.HUSKY_GIT_STDIN = await getStdinFn(); | ||
} | ||
if (command) { | ||
@@ -79,0 +68,0 @@ return runCommand(cwd, hookName, command, env); |
{ | ||
"name": "husky", | ||
"version": "4.0.7", | ||
"version": "4.0.8", | ||
"description": "Prevents bad commit or push (git hooks, pre-commit/precommit, pre-push/prepush, post-merge/postmerge and all that stuff...)", | ||
@@ -55,3 +55,2 @@ "bin": { | ||
"cosmiconfig": "^6.0.0", | ||
"get-stdin": "^7.0.0", | ||
"opencollective-postinstall": "^2.0.2", | ||
@@ -58,0 +57,0 @@ "pkg-dir": "^4.2.0", |
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
8
48111
618
- Removedget-stdin@^7.0.0
- Removedget-stdin@7.0.0(transitive)