From 789027c4e0c8d3056404097c55f115c400cc23bc Mon Sep 17 00:00:00 2001 From: Jannis Mittenzwei Date: Tue, 10 Dec 2024 16:42:42 +0100 Subject: [PATCH] bug fix --- exasol/toolbox/tools/template.py | 2 +- exasol/toolbox/tools/workflow.py | 1 - .../cli/issue-install-if-github-directory-exist.t | 7 +++++++ .../cli/workflow-install-if-github-directory-exist.t | 7 +++++++ 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 test/integration/cli/issue-install-if-github-directory-exist.t create mode 100644 test/integration/cli/workflow-install-if-github-directory-exist.t diff --git a/exasol/toolbox/tools/template.py b/exasol/toolbox/tools/template.py index 8dbdde8ec..08ae3ed4a 100644 --- a/exasol/toolbox/tools/template.py +++ b/exasol/toolbox/tools/template.py @@ -120,7 +120,7 @@ def install_template(template: str, dest: Path, pkg: str, template_type: str) -> Attention: If there is an existing template with the same name it will be overwritten! """ if not dest.exists(): - dest.mkdir() + dest.mkdir(parents=True) try: templates = _select_templates(template, pkg, template_type) diff --git a/exasol/toolbox/tools/workflow.py b/exasol/toolbox/tools/workflow.py index 6537630cf..e948ce485 100644 --- a/exasol/toolbox/tools/workflow.py +++ b/exasol/toolbox/tools/workflow.py @@ -56,7 +56,6 @@ def install_workflow( Attention: If there is an existing workflow with the same name it will be overwritten! """ - dest.mkdir(parents=True) template.install_template( template=workflow, dest=dest, pkg=PKG, template_type=TEMPLATE_TYPE ) diff --git a/test/integration/cli/issue-install-if-github-directory-exist.t b/test/integration/cli/issue-install-if-github-directory-exist.t new file mode 100644 index 000000000..7d19874e2 --- /dev/null +++ b/test/integration/cli/issue-install-if-github-directory-exist.t @@ -0,0 +1,7 @@ +Create project directory + $ mkdir .github + $ mkdir .github/workflows + +install issue + $ tbx issue install bug + Installed bug in .github/ISSUE_TEMPLATE/bug.md diff --git a/test/integration/cli/workflow-install-if-github-directory-exist.t b/test/integration/cli/workflow-install-if-github-directory-exist.t new file mode 100644 index 000000000..8e8e23a9c --- /dev/null +++ b/test/integration/cli/workflow-install-if-github-directory-exist.t @@ -0,0 +1,7 @@ +Create project directory + $ mkdir .github + $ mkdir .github/workflows + +install workflow + $ tbx workflow install pr-merge + Installed pr-merge in .github/workflows/pr-merge.yml