lib/whiskey_disk.rb in ol-whisk_deploy-0.6.25 vs lib/whiskey_disk.rb in ol-whisk_deploy-0.6.26

- old
+ new

@@ -125,12 +125,19 @@ def encode_roles(roles) return '' unless roles and !roles.empty? "export WD_ROLES='#{roles.join(':')}'; " end + + def encode_env_vars(vars) + return '' unless vars and !vars.empty? + vars.map do |name, val| + "export #{name}='#{val}'; " + end.join + end def build_command(domain, cmd) - "#{'set -x; ' if debugging?}" + encode_roles(domain['roles']) + cmd + "#{'set -x; ' if debugging?}" + encode_env_vars(domain['env_vars']) + encode_roles(domain['roles']) + cmd end def rake_command (setting(:rake_command) and setting(:rake_command) != '') ? setting(:rake_command) : 'rake' end