From c29fb5870010760afa5915cf3ef7dbf8473ccf8d Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Fri, 22 May 2020 10:19:39 +0200 Subject: [PATCH] fix mkdir error when create is false in config --- dotdrop/installer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dotdrop/installer.py b/dotdrop/installer.py index b37faa0..46cedd2 100644 --- a/dotdrop/installer.py +++ b/dotdrop/installer.py @@ -263,7 +263,7 @@ class Installer: return True, None base = os.path.dirname(dst) if not self._create_dirs(base): - err = 'creating directory for {}'.format(dst) + err = 'error creating directory for {}'.format(dst) return False, err r, e = self._exec_pre_actions(actionexec) if not r: @@ -465,7 +465,9 @@ class Installer: def _create_dirs(self, directory): """mkdir -p """ if not self.create and not os.path.exists(directory): - return False, + if self.debug: + self.log.dbg('no mkdir as \"create\" set to false in config') + return False if os.path.exists(directory): return True if self.dry: