Skip to content

Commit

Permalink
fix: skip nix on darwin only when nix-darwin is installed (topgrade-r…
Browse files Browse the repository at this point in the history
…s#14)

Authored-by: XYenon <[email protected]>
Approved-by: Thomas Schönauer <[email protected]>
  • Loading branch information
s34m authored Oct 10, 2022
1 parent 2d94eb9 commit ae544cd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/steps/os/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,16 @@ pub fn run_nix(ctx: &ExecutionContext) -> Result<()> {
}
}

#[cfg(target_os = "macos")]
{
if let Ok(..) = require("darwin-rebuild") {
return Err(SkipStep(String::from(
"Nix-darwin on macOS must be upgraded via darwin-rebuild switch",
))
.into());
}
}

let run_type = ctx.run_type();

if should_self_upgrade {
Expand Down

0 comments on commit ae544cd

Please sign in to comment.