mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 12:45:27 +03:00
switch-to-configuration-ng: prevent error during NIXOS_LUSTRATE install
This commit is contained in:
parent
898c9e3c91
commit
4dd2fd7716
1 changed files with 5 additions and 4 deletions
|
@ -970,10 +970,6 @@ fn do_system_switch(action: Action) -> anyhow::Result<()> {
|
|||
std::env::set_var("LOCALE_ARCHIVE", locale_archive);
|
||||
}
|
||||
|
||||
let current_system_bin = std::path::PathBuf::from("/run/current-system/sw/bin")
|
||||
.canonicalize()
|
||||
.context("/run/current-system/sw/bin is missing")?;
|
||||
|
||||
let os_release = parse_os_release().context("Failed to parse os-release")?;
|
||||
|
||||
let distro_id_re = Regex::new(format!("^\"?{}\"?$", distro_id).as_str())
|
||||
|
@ -1033,6 +1029,11 @@ fn do_system_switch(action: Action) -> anyhow::Result<()> {
|
|||
std::process::exit(0);
|
||||
}
|
||||
|
||||
// Needs to be after the "boot" action exits, as this directory will not exist when doing a NIXOS_LUSTRATE install
|
||||
let current_system_bin = std::path::PathBuf::from("/run/current-system/sw/bin")
|
||||
.canonicalize()
|
||||
.context("/run/current-system/sw/bin is missing")?;
|
||||
|
||||
let current_init_interface_version =
|
||||
std::fs::read_to_string("/run/current-system/init-interface-version").unwrap_or_default();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue