Skip to content

Commit

Permalink
Merge pull request #227 from dora-rs/fix-missing-env-variable
Browse files Browse the repository at this point in the history
Fix missing env variable
  • Loading branch information
phil-opp authored Mar 22, 2023
2 parents 86599a2 + a04752a commit d568613
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion binaries/daemon/src/spawn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,18 @@ pub async fn spawn_node(
serde_yaml::to_string(&runtime_config)
.wrap_err("failed to serialize runtime config")?,
);
// Injecting the env variable defined in the `yaml` into
// the node runtime.
if let Some(envs) = node.env {
for (key, value) in envs {
command.env(key, value.to_string());
}
}

command.spawn().wrap_err("failed to run runtime")?
command.spawn().wrap_err(format!(
"failed to run runtime {}/{}",
runtime_config.node.dataflow_id, runtime_config.node.node_id
))?
}
};

Expand Down

0 comments on commit d568613

Please sign in to comment.