Skip to content

Commit

Permalink
Use --no-update-lock-file instead of --no-write-lock-file
Browse files Browse the repository at this point in the history
This will prevent uploading of flakes that need to be re-locked.
  • Loading branch information
cole-h committed Nov 6, 2023
1 parent 8aab4c8 commit 55ab445
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/flake_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ pub(crate) async fn check_flake_evaluates(directory: &Path) -> color_eyre::Resul
.arg("show")
.arg("--all-systems")
.arg("--json")
.arg("--no-write-lock-file")
.arg("--no-update-lock-file")
.arg(directory)
.output()
.await
.wrap_err_with(|| {
eyre!(
"Failed to execute `nix flake show --all-systems --json --no-write-lock-file {}`",
"Failed to execute `nix flake show --all-systems --json --no-update-lock-file {}`",
directory.display()
)
})?;

if !output.status.success() {
let command = format!(
"nix flake show --all-systems --json --no-write-lock-file {}",
"nix flake show --all-systems --json --no-update-lock-file {}",
directory.display(),
);
let msg = format!(
Expand Down Expand Up @@ -110,7 +110,7 @@ pub(crate) async fn get_flake_metadata(directory: &Path) -> color_eyre::Result<s
.arg("flake")
.arg("metadata")
.arg("--json")
.arg("--no-write-lock-file")
.arg("--no-update-lock-file")
.arg(directory)
.output()
.await
Expand Down Expand Up @@ -149,7 +149,7 @@ pub(crate) async fn get_flake_outputs(flake_url: &str) -> color_eyre::Result<ser
let mut cmd = tokio::process::Command::new("nix");
cmd.arg("eval");
cmd.arg("--json");
cmd.arg("--no-write-lock-file");
cmd.arg("--no-update-lock-file");
cmd.arg(format!("{}#contents", tempdir.path().display()));
let output = cmd
.output()
Expand Down

0 comments on commit 55ab445

Please sign in to comment.