fix env variable load and subst order
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 1m24s
Build-Test-Publish / build (linux/arm64) (push) Successful in 4m16s

This commit is contained in:
2025-10-03 18:56:04 +13:00
parent e001413844
commit af75b0b4ac
13 changed files with 124 additions and 64 deletions

View File

@@ -347,14 +347,14 @@ namespace dropshell
std::string remote_service_template_path = remotepath(mServerName, user).service_template(service_name);
std::string script_path = remote_service_template_path + "/" + command + ".sh";
std::map<std::string, std::string> env_vars;
ordered_env_vars env_vars;
if (!get_all_service_env_vars(mServerName, service_name, env_vars))
{
error << "Failed to get all service env vars for " << service_name << std::endl;
return std::nullopt;
}
env_vars["HOST_NAME"] = get_SSH_HOST();
set_var(env_vars, "HOST_NAME", get_SSH_HOST());
std::string argstr = "";
for (const auto &arg : args)