From 520cde8d2f3ab7748f6e292186b7b4d7f072dcea Mon Sep 17 00:00:00 2001 From: Angelos Evripiotis Date: Mon, 14 Aug 2017 19:14:07 +0100 Subject: 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. --- buildstream/_pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1