Skip to content

Commit

Permalink
fix(k8s): better error message when kubectl fails
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Jun 14, 2018
1 parent d222721 commit 41f1482
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/kubernetes/kubectl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ export class Kubectl {
const _reject = (msg: string) => {
const dataStr = data ? data.toString() : null
const details = extend({ args, preparedArgs, msg, data: dataStr }, <any>out)
const err = new RuntimeError(`Failed running 'kubectl ${args.join(" ")}'`, details)

const err = new RuntimeError(
`Failed running 'kubectl ${preparedArgs.join(" ")}': ${out.output}`,
details,
)
reject(err)
}

Expand Down

0 comments on commit 41f1482

Please sign in to comment.