Skip to content

Commit

Permalink
Resolve build warning for LegacyKeyValueFormat (#1183)
Browse files Browse the repository at this point in the history
  • Loading branch information
guoard authored Sep 5, 2024
1 parent cd3dcf5 commit d50429e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nixpacks/builder/docker/dockerfile_generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ impl DockerfileGenerator for Phase {
// Ensure paths are available in the environment
let build_path = if let Some(paths) = &phase.paths {
let joined_paths = paths.join(":");
format!("ENV NIXPACKS_PATH {joined_paths}:$NIXPACKS_PATH")
format!("ENV NIXPACKS_PATH={joined_paths}:$NIXPACKS_PATH")
} else {
String::new()
};
Expand Down Expand Up @@ -474,6 +474,7 @@ mod tests {
fn test_phase_generation() {
let mut phase = Phase::new("test");
phase.add_cmd("echo test");
phase.add_path("/test".to_string());

let dockerfile = phase
.generate_dockerfile(
Expand All @@ -485,6 +486,7 @@ mod tests {
.unwrap();

assert!(dockerfile.contains("echo test"));
assert!(dockerfile.contains("ENV NIXPACKS_PATH=/test:$NIXPACKS_PATH"));
}

#[test]
Expand Down

0 comments on commit d50429e

Please sign in to comment.