Skip to content

Commit

Permalink
devenv: fix --update-input warning when running devenv update
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Oct 7, 2024
1 parent 041249f commit 135255b
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions devenv/src/cnix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,20 +217,14 @@ impl<'a> Nix<'a> {
}

pub async fn update(&self, input_name: &Option<String>) -> Result<()> {
match input_name {
Some(input_name) => {
self.run_nix(
"nix",
&["flake", "lock", "--update-input", input_name],
&self.options,
)
.await?;
}
None => {
self.run_nix("nix", &["flake", "update"], &self.options)
.await?;
}
let mut args = vec!["flake", "update"];

if let Some(input_name) = input_name {
args.push(input_name);
}

self.run_nix("nix", &args, &self.options).await?;

Ok(())
}

Expand Down

0 comments on commit 135255b

Please sign in to comment.