commitplease
Advanced tools
Comparing version 2.7.0 to 2.7.1-0
@@ -12,9 +12,24 @@ var fs = require('fs') | ||
function xmkdirSync (path, mode) { | ||
try { | ||
fs.mkdirSync(path, mode) | ||
} catch (err) { | ||
if (/EPERM/.test(err.message)) { | ||
console.error('Failed to create: ' + path) | ||
console.error('Make sure you have the necessary permissions') | ||
process.exit(1) | ||
} else if (/EEXIST/.test(err.message)) { | ||
// do nothing | ||
} else { | ||
console.error(err) | ||
process.exit(1) | ||
} | ||
} | ||
} | ||
var git = path.resolve(process.cwd(), '..', '..', '.git') | ||
var hooks = path.join(git, 'hooks') | ||
if (!fs.existsSync(git) || !fs.existsSync(hooks)) { | ||
fs.mkdirSync(git) | ||
fs.mkdirSync(hooks) | ||
} | ||
xmkdirSync(git, parseInt('755', 8)) | ||
xmkdirSync(hooks, parseInt('755', 8)) | ||
@@ -21,0 +36,0 @@ var dstHook = path.join(hooks, 'commit-msg') |
{ | ||
"name": "commitplease", | ||
"version": "2.7.0", | ||
"version": "2.7.1-0", | ||
"description": "Validates strings as commit messages", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
43643
1176
2