Print error cause no matter what

Ensure that we print the error cause when we catch an error
This commit is contained in:
Bret Comnes
2022-11-06 21:02:11 -07:00
parent 4f62bb5b90
commit 8fae4b2c6c
2 changed files with 4 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ const ms = require('ms')
const assert = require('webassert').default
const fsp = require('fs').promises
const minimatch = require('minimatch')
const { stackWithCauses } = require('pony-cause')
let cleanup
@@ -41,7 +42,7 @@ async function doDeploy () {
}
doDeploy().catch(err => {
console.error(err)
console.error(stackWithCauses(err))
if (err.stats) {
console.log('Files to upload: ')
console.dir(err.stats.filesToUpload, { colors: true, depth: 999 })