mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 12:09:19 +00:00
fix verbosity
This commit is contained in:
@@ -168,7 +168,8 @@ class Installer:
|
|||||||
r = False
|
r = False
|
||||||
err = 'aborted'
|
err = 'aborted'
|
||||||
else:
|
else:
|
||||||
self.log.sub('chmod {} to {:o}'.format(dst, chmod))
|
if not self.comparing:
|
||||||
|
self.log.sub('chmod {} to {:o}'.format(dst, chmod))
|
||||||
if utils.chmod(dst, chmod, debug=self.debug):
|
if utils.chmod(dst, chmod, debug=self.debug):
|
||||||
r = True
|
r = True
|
||||||
else:
|
else:
|
||||||
@@ -276,7 +277,8 @@ class Installer:
|
|||||||
if self.dry:
|
if self.dry:
|
||||||
self.log.dry('would create directory "{}"'.format(dst))
|
self.log.dry('would create directory "{}"'.format(dst))
|
||||||
else:
|
else:
|
||||||
self.log.sub('creating directory "{}"'.format(dst))
|
if not self.comparing:
|
||||||
|
self.log.sub('creating directory "{}"'.format(dst))
|
||||||
os.makedirs(dst)
|
os.makedirs(dst)
|
||||||
|
|
||||||
if os.path.isfile(dst):
|
if os.path.isfile(dst):
|
||||||
@@ -386,7 +388,8 @@ class Installer:
|
|||||||
err = 'something went wrong with {}: {}'.format(src, e)
|
err = 'something went wrong with {}: {}'.format(src, e)
|
||||||
return False, err
|
return False, err
|
||||||
os.symlink(src, dst)
|
os.symlink(src, dst)
|
||||||
self.log.sub('linked {} to {}'.format(dst, src))
|
if not self.comparing:
|
||||||
|
self.log.sub('linked {} to {}'.format(dst, src))
|
||||||
return True, None
|
return True, None
|
||||||
|
|
||||||
def _copy_file(self, templater, src, dst,
|
def _copy_file(self, templater, src, dst,
|
||||||
@@ -661,7 +664,8 @@ class Installer:
|
|||||||
return True
|
return True
|
||||||
if self.debug:
|
if self.debug:
|
||||||
self.log.dbg('mkdir -p {}'.format(directory))
|
self.log.dbg('mkdir -p {}'.format(directory))
|
||||||
self.log.sub('create directory {}'.format(directory))
|
if not self.comparing:
|
||||||
|
self.log.sub('create directory {}'.format(directory))
|
||||||
|
|
||||||
os.makedirs(directory, exist_ok=True)
|
os.makedirs(directory, exist_ok=True)
|
||||||
return os.path.exists(directory)
|
return os.path.exists(directory)
|
||||||
|
|||||||
Reference in New Issue
Block a user