Commit 8f0db828 authored by Samuel Sirois's avatar Samuel Sirois
Browse files

Fix override file if exists instead of <rm> + <cp>

parent 5a83a851
Pipeline #6950 failed with stages
in 55 seconds
...@@ -79,12 +79,9 @@ def aliases(): ...@@ -79,12 +79,9 @@ def aliases():
dk_run(env.services['php'], user='root', dk_run(env.services['php'], user='root',
cmd='if [ ! -e {} ]; then mkdir {}; fi;'.format(drush_aliases, drush_aliases)) cmd='if [ ! -e {} ]; then mkdir {}; fi;'.format(drush_aliases, drush_aliases))
if os.path.exists('{}/aliases.drushrc.php'.format(drush_aliases)):
dk_run(env.services['php'], user='root',
cmd='rm {}/aliases.drushrc.php'.format(drush_aliases))
if os.path.exists('{}/conf/aliases.drushrc.php'.format(workspace)): if os.path.exists('{}/conf/aliases.drushrc.php'.format(workspace)):
dk_run(env.services['php'], user='root', dk_run(env.services['php'], user='root',
cmd='cp {}/conf/aliases.drushrc.php {}/'.format(workspace, cmd='cp --force {}/conf/aliases.drushrc.php {}/'.format(workspace,
drush_aliases)) drush_aliases))
print(green('Drush aliases have been copied to {} directory.' print(green('Drush aliases have been copied to {} directory.'
''.format(drush_aliases))) ''.format(drush_aliases)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment