From 40f7e09c0f25e8dc05188d272d4c01c58de7229a Mon Sep 17 00:00:00 2001 From: Bernhard Sirlinger Date: Thu, 23 Jan 2020 08:03:14 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20issue=20when=20ignore=5Fexist=20is=20set?= =?UTF-8?q?=20and=20the=20path=20already=20exists=20=F0=9F=90=9B=20(#910)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/frappe/bench/commit/7fb1484b7f5dae561a098ab2a01c7f209664f626#diff-237d6b07e1835fbd8e51e251f66b2ec0 where the logic was changes to exclude handling this edge case --- bench/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bench/utils.py b/bench/utils.py index a81c52e4..3b5b2bb6 100755 --- a/bench/utils.py +++ b/bench/utils.py @@ -77,7 +77,8 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False, no_auto_upda if os.path.exists(path) and not ignore_exist: log('Path {path} already exists!'.format(path=path)) sys.exit(0) - else: + elif not os.path.exists(path): + # only create dir if it does not exist os.makedirs(path) for dirname in folders_in_bench: