1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 18:34:48 +00:00

check for workers in cmd_install

This commit is contained in:
deadc0de6
2020-11-16 14:25:44 +01:00
parent 315a898e77
commit d089184876
2 changed files with 6 additions and 3 deletions

View File

@@ -165,6 +165,12 @@ def cmd_install(o):
"""install dotfiles for this profile"""
dotfiles = o.dotfiles
prof = o.conf.get_profile()
# ensure parallel install is unattended
if o.install_parallel > 1 and o.safe:
LOG.err('\"-w --workers\" must be used with \"-f --force\"')
return False
pro_pre_actions = prof.get_pre_actions() if prof else []
pro_post_actions = prof.get_post_actions() if prof else []

View File

@@ -256,9 +256,6 @@ class Options(AttrMonitor):
except ValueError:
self.log.err('bad option for --workers')
sys.exit(USAGE)
if self.safe and self.install_parallel > 1:
self.log.err('\"-w --workers\" must be used with \"-f --force\"')
sys.exit(USAGE)
# "compare" specifics
self.compare_focus = self.args['--file']