diff --git a/packages/cli/bin/run b/packages/cli/bin/run index 7e8dd6a0ab..c977a4e527 100755 --- a/packages/cli/bin/run +++ b/packages/cli/bin/run @@ -46,6 +46,7 @@ oclif.run().then(require('@oclif/core/flush')).catch(async error => { const cliError = error cliError.cliRunDuration = globalTelemetry.computeDuration(cliStartTime) await globalTelemetry.sendTelemetry(cliError) - console.log(`Error: ${error.message}`) + + return require('@oclif/core/handle')(error) }) diff --git a/packages/cli/src/commands/run/index.ts b/packages/cli/src/commands/run/index.ts index a52116ac29..879fa40a7d 100644 --- a/packages/cli/src/commands/run/index.ts +++ b/packages/cli/src/commands/run/index.ts @@ -1,5 +1,5 @@ import {Command, flags} from '@heroku-cli/command-v9' -import {DynoSizeCompletion, ProcessTypeCompletion} from '@heroku-cli/command/lib/completions' +import {DynoSizeCompletion, ProcessTypeCompletion} from '@heroku-cli/command-v9/lib/completions' import {CliUx} from '@oclif/core-v1' import '@oclif/core-v1/lib/parser' import debugFactory from 'debug' diff --git a/scripts/postrelease/test_release b/scripts/postrelease/test_release index ac9b357e06..20522a95ce 100755 --- a/scripts/postrelease/test_release +++ b/scripts/postrelease/test_release @@ -56,6 +56,7 @@ declare -a COMMANDS=( "$CMD_BIN regions" "$CMD_BIN releases --app heroku-cli-test-staging" "$CMD_BIN run ls -a heroku-cli-test-staging -- --color" + "$CMD_BIN run -x -a heroku-cli-test-staging -- 'bash -c \"exit 2\"'" "$CMD_BIN run:detached \"echo 'Hello World'\" -a heroku-cli-test-staging" "$CMD_BIN sessions" "$CMD_BIN spaces"