mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-17 15:53:38 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
20
node_modules/standard-version/lib/run-exec.js
generated
vendored
Normal file
20
node_modules/standard-version/lib/run-exec.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
const exec = require('child_process').exec
|
||||
const printError = require('./print-error')
|
||||
|
||||
module.exports = function (args, cmd) {
|
||||
if (args.dryRun) return Promise.resolve()
|
||||
return new Promise((resolve, reject) => {
|
||||
// Exec given cmd and handle possible errors
|
||||
exec(cmd, function (err, stdout, stderr) {
|
||||
// If exec returns content in stderr, but no error, print it as a warning
|
||||
// If exec returns an error, print it and exit with return code 1
|
||||
if (err) {
|
||||
printError(args, stderr || err.message)
|
||||
return reject(err)
|
||||
} else if (stderr) {
|
||||
printError(args, stderr, {level: 'warn', color: 'yellow'})
|
||||
}
|
||||
return resolve(stdout)
|
||||
})
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user