Skip to content
Snippets Groups Projects
Commit e2efc8c0 authored by Angelos Evripiotis's avatar Angelos Evripiotis
Browse files

BREAK: make destructive action scripts consistent

Make sure that BuildStream doesn't behave differently about destructive
things just because it's in non-interactive mode, e.g. being run from a
misconfigured workflow helper script.

By default, assume that users opt-out of destructive actions if we
are unable to ask them. For the currently affected commands, this means
aborting completely.

This seems less surprising than doing the destructive action instead.
Also, for folks that find the new behaviour surprising, at least they
don't lose work.

Introduce an '--assume-yes' option to affected commands to override this
behaviour.

If a command aborts for this reason, print a message suggesting the use
of '--assume-yes'. Don't mention the corresponding 'prompt.*' options
that also control this behaviour - this would hinder portability of
scripts between users with different settings.

This affects:

- bst workspace close --remove-dir
- bst workspace reset

Closes #744, #726.
parent 84317251
No related branches found
No related tags found
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment