Otherwise, if /var/tmp/catalyst does not exist when the snapshot target
is executed it will fail to make the snapshots/ directory.

Signed-off-by: Matt Turner <[email protected]>
---
 catalyst/base/targetbase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/targetbase.py b/catalyst/base/targetbase.py
index 5bcea920..3e338bee 100644
--- a/catalyst/base/targetbase.py
+++ b/catalyst/base/targetbase.py
@@ -24,7 +24,7 @@ class TargetBase(ABC):
     def set_snapshot(self, treeish=None):
         # Make snapshots directory
         snapshot_dir = Path(self.settings['storedir'], 'snapshots')
-        snapshot_dir.mkdir(mode=0o755, exist_ok=True)
+        snapshot_dir.mkdir(mode=0o755, parents=True, exist_ok=True)
 
         repo_name = self.settings['repo_name']
         if treeish is None:
-- 
2.26.2


Reply via email to