Skip to content

Commit a0874a4

Browse files
committed
allow switching between system specialisations
1 parent 9bbd963 commit a0874a4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/nixos.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,11 @@ impl OsRebuildArgs {
153153
.nom(!self.common.no_nom)
154154
.run()?;
155155

156-
let current_specialisation = std::fs::read_to_string(SPEC_LOCATION).ok();
157-
158156
let target_specialisation = if self.no_specialisation {
159157
None
160158
} else {
161-
current_specialisation.or_else(|| self.specialisation.clone())
159+
self.specialisation
160+
.or(std::fs::read_to_string(SPEC_LOCATION).ok())
162161
};
163162

164163
debug!("target_specialisation: {target_specialisation:?}");

0 commit comments

Comments
 (0)