diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2017-08-14 19:14:07 +0100 |
---|---|---|
committer | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2017-08-15 12:59:23 +0100 |
commit | 520cde8d2f3ab7748f6e292186b7b4d7f072dcea (patch) | |
tree | b945f69cea52a5b767126d6e9a4d5aa5ccac5038 | |
parent | 4b9f0d256c1cc15bb19221cb775e5a62e815ae9d (diff) | |
download | buildstream-520cde8d2f3ab7748f6e292186b7b4d7f072dcea.tar.gz |
workspace open: --no-checkout doesn't need --force
Remove the requirement to specify '--force' in conjunction with
'--no-checkout' if there are already files in the workspace. We won't
write anything when opening the workspace, so there's nothing to force.
For example, when opening a workspace to an existing clone of a
repository, it seems alarming to have to '--force' the workspace open.
It made me wonder if it will actually be overwritten.
-rw-r--r-- | buildstream/_pipeline.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py index 80dd8b30a..31e68edbe 100644 --- a/buildstream/_pipeline.py +++ b/buildstream/_pipeline.py @@ -518,7 +518,7 @@ class Pipeline(): except OSError as e: raise PipelineError("Failed to create workspace directory: {}".format(e)) from e - if not force and os.listdir(directory): + if not no_checkout and not force and os.listdir(directory): raise PipelineError("Checkout directory is not empty: {}".format(directory)) # Check for workspace config |