Skip to content
Commit 5d1a33e1 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.

This is a breaking change, as the behaviour will not be the same for
folks that have already scripted the use of these commands.

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
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment