fix: skip nix on darwin only when nix-darwin is installed (#14)

Authored-by: XYenon <i@xyenon.bid>
Approved-by: Thomas Schönauer <t.schoenauer@hgs-wt.at>
This commit is contained in:
DottoDev
2022-10-10 20:22:06 +00:00
committed by GitHub
parent 2d94eb974f
commit ae544cdaae

View File

@@ -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 {