Skip to content

Commit 72260ef

Browse files
Copilotsrid
andcommitted
Remove flake/ prefix transformation from --override-input arguments
Co-authored-by: srid <3998+srid@users.noreply.github.com>
1 parent e78c360 commit 72260ef

File tree

1 file changed

+5
-17
lines changed
  • crates/nix_rs/src/flake/functions

1 file changed

+5
-17
lines changed

crates/nix_rs/src/flake/functions/core.rs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,12 @@ pub trait FlakeFn {
105105
}
106106
}
107107

108-
/// Transform `--override-input` arguments to use `flake/` prefix, which
109-
/// devour_flake expects.
110-
///
111-
/// NOTE: This assumes that Input struct contains a field named exactly "flake" referring to the flake. We should probably be smart about this.
108+
/// Pass through `--override-input` arguments without transformation.
109+
///
110+
/// The `flake/` prefix transformation was removed as of v1.0.0 since it's no longer necessary.
112111
fn transform_override_inputs(args: &[String]) -> Vec<String> {
113-
let mut new_args = Vec::with_capacity(args.len());
114-
let mut iter = args.iter().peekable();
115-
116-
while let Some(arg) = iter.next() {
117-
new_args.push(arg.clone());
118-
if arg == "--override-input" {
119-
if let Some(next_arg) = iter.next() {
120-
new_args.push(format!("flake/{}", next_arg));
121-
}
122-
}
123-
}
124-
125-
new_args
112+
// Simply return args as-is, no flake/ prefix transformation needed
113+
args.to_vec()
126114
}
127115

128116
/// Convert a struct of uniform value types (Option allowed, however) into a vector of fields. The value should be of String kind.

0 commit comments

Comments
 (0)