summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-07-13 13:24:07 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-07-13 13:24:07 +0900
commita38e1aa0ad491ec5ba60bc6552e10206c8bb737b (patch)
treef46abfa204f3b8c5cea48f755ad26c66babea3a3
parentb9cfc6399d71db9764f1e167709dfe423b972b66 (diff)
downloadbuildstream-a38e1aa0ad491ec5ba60bc6552e10206c8bb737b.tar.gz
_pipeline.py: Additional writable check of directory in Pipeline.checkout()
-rw-r--r--buildstream/_pipeline.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py
index 14b1e09ae..02896eafa 100644
--- a/buildstream/_pipeline.py
+++ b/buildstream/_pipeline.py
@@ -423,6 +423,9 @@ class Pipeline():
except OSError as e:
raise PipelineError("Failed to create checkout directory: {}".format(e)) from e
+ if not os.access(directory, os.W_OK):
+ raise PipelineError("Directory {} not writable".format(directory))
+
if not force and os.listdir(directory):
raise PipelineError("Checkout directory is not empty: {}"
.format(directory))