Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devenv: fix warning about --update-input when running devenv update #1506

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion devenv-eval-cache/src/internal_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ impl InternalLog {
// to filter things out. Our hunch is that these messages are coming from the
// nix daemon.
InternalLog::Msg { msg, level, .. }
if *level == Verbosity::Error && (self.is_nix_error() || self.is_builtin_trace()) =>
if *level == Verbosity::Error
&& (self.is_nix_error() || self.is_builtin_trace()) =>
{
Some(msg.clone())
}
Expand Down
1 change: 0 additions & 1 deletion devenv-tasks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1327,4 +1327,3 @@ fi
Ok(temp_file.into_temp_path())
}
}

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);
domenkozar marked this conversation as resolved.
Show resolved Hide resolved
}

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

Ok(())
}

Expand Down
Loading