Skip to content

Commit

Permalink
warn if Nix version is very old
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Mar 21, 2024
1 parent 868cbd9 commit 57e4a14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions devenv/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ impl App {
let trusted = serde_json::from_slice::<StorePing>(&store.stdout)
.expect("Failed to parse JSON")
.trusted;
if trusted == None {
self.logger
.warn("You're using very old version of Nix, please upgrade.");
}
if trusted == Some(0) {
bail!(indoc::formatdoc!(
"You're not a trusted user of the Nix store. You have the following options:
Expand Down

0 comments on commit 57e4a14

Please sign in to comment.