Skip to content

Commit

Permalink
Merge pull request #1650 from ento/fix-default-copy-args
Browse files Browse the repository at this point in the history
Fix defaultCopyArgs always getting ignored
  • Loading branch information
domenkozar authored Dec 26, 2024
2 parents 4b8677f + 7847d8c commit 991abff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions devenv/src/devenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,16 +332,16 @@ impl Devenv {
let copy_script = &copy_script[0];
let copy_script_string = &copy_script.to_string_lossy();

let copy_args = [
spec,
registry.unwrap_or("false").to_string(),
copy_args.join(" "),
];
let base_args = [spec, registry.unwrap_or("false").to_string()];
let command_args: Vec<String> = base_args
.into_iter()
.chain(copy_args.iter().map(|s| s.to_string()))
.collect();

info!("Running {copy_script_string} {}", copy_args.join(" "));
info!("Running {copy_script_string} {}", command_args.join(" "));

let status = std::process::Command::new(copy_script)
.args(copy_args)
.args(command_args)
.stdout(std::process::Stdio::inherit())
.stderr(std::process::Stdio::inherit())
.status()
Expand Down
2 changes: 1 addition & 1 deletion src/modules/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ let
echo "Copying container $container to $dest"
echo
${nix2container.skopeo-nix2container}/bin/skopeo --insecure-policy copy "nix:$container" "$dest" ''${args[@]}
${nix2container.skopeo-nix2container}/bin/skopeo --insecure-policy copy "nix:$container" "$dest" "''${args[@]}"
'';
containerOptions = types.submodule ({ name, config, ... }: {
options = {
Expand Down

0 comments on commit 991abff

Please sign in to comment.