husky
Advanced tools
Comparing version 5.0.6 to 5.0.7
@@ -16,3 +16,3 @@ #!/usr/bin/env node | ||
const pkg = readPkg(); | ||
const [, , arg, ...params] = process.argv; | ||
const [, , cmd, ...args] = process.argv; | ||
function version() { | ||
@@ -38,9 +38,9 @@ console.log(pkg.version); | ||
} | ||
switch (arg) { | ||
switch (cmd) { | ||
case 'install': { | ||
if (params.length > 2) { | ||
if (args.length > 2) { | ||
help(); | ||
process.exit(2); | ||
} | ||
install_1.install(params[0]); | ||
install_1.install(args[0]); | ||
break; | ||
@@ -53,7 +53,7 @@ } | ||
case 'add': { | ||
if (params.length === 0 || params.length > 2) { | ||
if (args.length === 0 || args.length > 2) { | ||
help(); | ||
process.exit(2); | ||
} | ||
add_1.add(params[0], params[1]); | ||
add_1.add(args[0], args[1]); | ||
break; | ||
@@ -60,0 +60,0 @@ } |
@@ -20,3 +20,3 @@ "use strict"; | ||
} | ||
const data = ['#!/bin/sh', '. "$(dirname $0)/_/husky.sh"', '', cmd].join('\n'); | ||
const data = ['#!/bin/sh', '. "$(dirname "$0")/_/husky.sh"', '', cmd].join('\n'); | ||
fs_1.default.writeFileSync(file, data, 'utf-8'); | ||
@@ -23,0 +23,0 @@ console.log(`created ${dir}${path_1.default.sep}${path_1.default.basename(file)}`); |
{ | ||
"name": "husky", | ||
"version": "5.0.6", | ||
"version": "5.0.7", | ||
"description": "Git hooks made easy", | ||
@@ -5,0 +5,0 @@ "bin": "lib/bin.js", |
@@ -12,2 +12,6 @@ # husky | ||
**Jan 23, 2021** - 👋 Read husky 5 announcement and see what's new: | ||
https://blog.typicode.com/husky-5 | ||
--- | ||
@@ -14,0 +18,0 @@ |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
24695
93
2