mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-08 09:39:16 +00:00
do not execute actions when installing to temp
This commit is contained in:
@@ -102,7 +102,7 @@ def cmd_install(opts, conf, temporary=False, keys=[]):
|
|||||||
installed = []
|
installed = []
|
||||||
for dotfile in dotfiles:
|
for dotfile in dotfiles:
|
||||||
preactions = []
|
preactions = []
|
||||||
if dotfile.actions and Cfg.key_actions_pre in dotfile.actions:
|
if not temporary and dotfile.actions and Cfg.key_actions_pre in dotfile.actions:
|
||||||
for action in dotfile.actions[Cfg.key_actions_pre]:
|
for action in dotfile.actions[Cfg.key_actions_pre]:
|
||||||
preactions.append(action)
|
preactions.append(action)
|
||||||
if opts['debug']:
|
if opts['debug']:
|
||||||
@@ -124,7 +124,7 @@ def cmd_install(opts, conf, temporary=False, keys=[]):
|
|||||||
if os.path.exists(tmp):
|
if os.path.exists(tmp):
|
||||||
remove(tmp)
|
remove(tmp)
|
||||||
if len(r) > 0:
|
if len(r) > 0:
|
||||||
if Cfg.key_actions_post in dotfile.actions:
|
if not temporary and Cfg.key_actions_post in dotfile.actions:
|
||||||
actions = dotfile.actions[Cfg.key_actions_post]
|
actions = dotfile.actions[Cfg.key_actions_post]
|
||||||
# execute action
|
# execute action
|
||||||
for action in actions:
|
for action in actions:
|
||||||
@@ -136,7 +136,7 @@ def cmd_install(opts, conf, temporary=False, keys=[]):
|
|||||||
action.execute()
|
action.execute()
|
||||||
installed.extend(r)
|
installed.extend(r)
|
||||||
if temporary:
|
if temporary:
|
||||||
LOG.log('\nInstalled to tmp {}.'.format(tmpdir))
|
LOG.log('\nInstalled to tmp \"{}\".'.format(tmpdir))
|
||||||
LOG.log('\n{} dotfile(s) installed.'.format(len(installed)))
|
LOG.log('\n{} dotfile(s) installed.'.format(len(installed)))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user