summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Pollard <tom.pollard@codethink.co.uk>2019-02-13 12:20:05 +0000
committerTom Pollard <tom.pollard@codethink.co.uk>2019-02-13 13:37:32 +0000
commitb546bac10b8c339ae7323282fcbcbc58c16e4ac0 (patch)
treeab224980d95756b4a06c88bdc29d38d3e1bfe9b0
parent118644b22b01a7849a9f8e8e9637e817ed8c443d (diff)
downloadbuildstream-b546bac10b8c339ae7323282fcbcbc58c16e4ac0.tar.gz
_frontend/cli.py: Ensure failed buildtree warning is correct
not _cached_sucess() could resolve to true if the element wasn't cached at all. switch to _cached_failure() to ensure condition reflects expected artifact state
-rw-r--r--buildstream/_frontend/cli.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py
index c4dd91c75..401eda9b6 100644
--- a/buildstream/_frontend/cli.py
+++ b/buildstream/_frontend/cli.py
@@ -575,7 +575,8 @@ def shell(app, element, sysroot, mount, isolate, build_, cli_buildtree, command)
if choice != "never":
use_buildtree = choice
- if use_buildtree and not element._cached_success():
+ # Raise warning if the element is cached in a failed state
+ if use_buildtree and element._cached_failure():
click.echo("WARNING: using a buildtree from a failed build.", err=True)
try: