@antora/cli
Advanced tools
Comparing version 3.0.0-alpha.2 to 3.0.0-alpha.3
@@ -22,9 +22,11 @@ #!/usr/bin/env node | ||
function exitWithError (err, showStack, msg = undefined) { | ||
msg = `error: ${msg || err.message || err}` | ||
// NOTE: the fallback for locating the stack can likely be removed after upgrading to Asciidoctor 2 | ||
console.error( | ||
showStack | ||
? err.stack || (err.backtrace ? [msg, ...err.backtrace.slice(1)].join('\n') : `${msg} (no stack)`) | ||
: `${msg}\nAdd the --stacktrace option to see the cause.` | ||
) | ||
if (!msg) msg = err.message || err | ||
if (showStack) { | ||
const stack = err.backtrace || (err.stack && err.stack.split('\n')) || [] | ||
const msgLine = stack.shift() | ||
msg = msgLine && msgLine.endsWith(': ' + msg) ? msgLine : `error: ${msg}` | ||
console.error(stack.length ? [msg, ...stack].join('\n') : `${msg} (no stack)`) | ||
} else { | ||
console.error(`error: ${msg}\nAdd the --stacktrace option to see the cause.`) | ||
} | ||
process.exit(1) | ||
@@ -31,0 +33,0 @@ } |
{ | ||
"name": "@antora/cli", | ||
"version": "3.0.0-alpha.2", | ||
"version": "3.0.0-alpha.3", | ||
"description": "The command line interface for Antora.", | ||
@@ -21,7 +21,7 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"@antora/playbook-builder": "3.0.0-alpha.2", | ||
"@antora/playbook-builder": "3.0.0-alpha.3", | ||
"commander": "~6.2" | ||
}, | ||
"devDependencies": { | ||
"@antora/site-publisher": "3.0.0-alpha.2", | ||
"@antora/site-publisher": "3.0.0-alpha.3", | ||
"convict": "~6.0", | ||
@@ -45,3 +45,3 @@ "kapok-js": "~0.10" | ||
], | ||
"gitHead": "997231474334311f3e5ff55d68534f5ae6e5d7ee" | ||
"gitHead": "2f02cf0d42fb5db4607ea5e600ca8a4ab45d5a5f" | ||
} |
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
26384
155
+ Added@antora/playbook-builder@3.0.0-alpha.3(transitive)
+ Addedjs-yaml@4.1.0(transitive)
- Removed@antora/playbook-builder@3.0.0-alpha.2(transitive)
- Removedjs-yaml@4.0.0(transitive)