summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vmdb/plugins/debootstrap_plugin.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/vmdb/plugins/debootstrap_plugin.py b/vmdb/plugins/debootstrap_plugin.py
index 3bfeff9..a951591 100644
--- a/vmdb/plugins/debootstrap_plugin.py
+++ b/vmdb/plugins/debootstrap_plugin.py
@@ -59,6 +59,12 @@ class DebootstrapStepRunner(vmdb.StepRunnerInterface):
if not (suite and tag and target and mirror):
raise Exception("missing arg for debootstrap step")
+ if os.path.exists(target):
+ if len(os.listdir(target)) > 0:
+ raise Exception(
+ f"debootstrap target is a non-empty directory: {target}"
+ )
+
cmd = [
"debootstrap",
"--arch",
@@ -103,4 +109,3 @@ class DebootstrapStepRunner(vmdb.StepRunnerInterface):
]
+ remove_pkgs,
)
-