From 4fe86244a501f35c60dc7f5269da21058016915c Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sun, 18 Sep 2016 02:48:53 +0000 Subject: [PATCH] Improve -on-error descriptions --- command/build.go | 5 +---- common/multistep_runner.go | 2 +- website/source/docs/command-line/build.html.md | 6 +++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/command/build.go b/command/build.go index 89e5101df..8f7b3d8ad 100644 --- a/command/build.go +++ b/command/build.go @@ -290,10 +290,7 @@ Options: -except=foo,bar,baz Build all builds other than these -force Force a build to continue if artifacts exist, deletes existing artifacts -machine-readable Machine-readable output - -on-error=abort If the build fails, abort without cleanup - -on-error=ask If the build fails, prompt for action - -on-error=cleanup If the build fails, clean up and exit (the default) - -only=foo,bar,baz Only build the given builds by name + -on-error=[cleanup|abort|ask] If the build fails do: clean up (default), abort, or ask -parallel=false Disable parallelization (on by default) -var 'key=value' Variable for templates, can be used multiple times. -var-file=path JSON file containing user variables. diff --git a/common/multistep_runner.go b/common/multistep_runner.go index edacee6a0..a9b155086 100644 --- a/common/multistep_runner.go +++ b/common/multistep_runner.go @@ -135,7 +135,7 @@ func ask(ui packer.Ui, name string, state multistep.StateBag) askResponse { func askPrompt(ui packer.Ui) askResponse { for { - line, err := ui.Ask("[C]lean up and exit, [a]bort without cleanup, or [r]etry step (build may fail even if retry succeeds)?") + line, err := ui.Ask("[c] Clean up and exit, [a] abort without cleanup, or [r] retry step (build may fail even if retry succeeds)?") if err != nil { log.Printf("Error asking for input: %s", err) } diff --git a/website/source/docs/command-line/build.html.md b/website/source/docs/command-line/build.html.md index 6939173e7..12a2175be 100644 --- a/website/source/docs/command-line/build.html.md +++ b/website/source/docs/command-line/build.html.md @@ -39,9 +39,9 @@ artifacts that are created will be outputted at the end of the build. - `-on-error=cleanup` (default), `-on-error=abort`, `-on-error=ask` - Selects what to do when the build fails. `cleanup` cleans up after the previous steps, deleting temporary files and virtual machines. `abort` exits without - any cleanup, but the next build may require `-force`. `ask` presents a - prompt and waits for you to decide to clean up, abort, or retry the failed - step. + any cleanup, which might require the next build to use `-force`. `ask` + presents a prompt and waits for you to decide to clean up, abort, or retry + the failed step. - `-only=foo,bar,baz` - Only build the builds with the given comma-separated names. Build names by default are the names of their