Skip to content

Commit

Permalink
chore: clearer log on unhandled error
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhq authored and thsig committed May 12, 2023
1 parent 4b2b322 commit 72f7587
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,12 @@ export async function runCli({
code = result.code
} catch (err) {
// eslint-disable-next-line no-console
console.log(`Unhandled error when running garden\n${err.message}`)
console.log(`Warning: Exiting with unhandled error\n${err.message}`)
code = 1
} finally {
if (cli?.processRecord) {
const globalConfigStore = new GlobalConfigStore()

try {
await globalConfigStore.delete("activeProcesses", String(cli.processRecord.pid))
} catch (err) {
// eslint-disable-next-line no-console
console.log(`Global config store cleanup failed, ${err.message}`)
}
await globalConfigStore.delete("activeProcesses", String(cli.processRecord.pid))
}
await shutdown(code)
}
Expand Down

0 comments on commit 72f7587

Please sign in to comment.