Commit 12720aef authored by 20th (Victor Nikulshin)'s avatar 20th (Victor Nikulshin) Committed by Victor Nikulshin

Check for empty env.site_languages during make build

Do not try to download translation if no languages were set in site
configuration. Otherwise, Drush will try to download translations, will be able
to find anything, and ultimately fail environment initialization.
parent d4aa5137
......@@ -49,12 +49,13 @@ def make(action='install'):
drush_opts += "--contrib-destination=profiles/{} ".format(env.site_profile)
h.update_profile()
if not env.get('always_use_pty', True):
drush_opts += "--translations=" + env.site_languages + " "
elif confirm(red('Say [Y] to {} the site at {} with the specified translation(s): {}. If you say [n] '
'the site will be installed in English only'.format(action, env.site_root, env.site_languages))):
if env.site_languages:
if not env.get('always_use_pty', True):
drush_opts += "--translations=" + env.site_languages + " "
elif confirm(red('Say [Y] to {} the site at {} with the specified translation(s): {}. If you say [n] '
'the site will be installed in English only'.format(action, env.site_root, env.site_languages))):
drush_opts += "--translations=" + env.site_languages + " "
drush_opts += "--translations=" + env.site_languages + " "
if env.get('always_use_pty', True):
drush_opts += " --working-copy --no-gitinfofile"
......
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