Allow Nix unfree packages to be upgraded (#881)
Allow unfree packages to be upgraded Fixes #611. Co-authored-by: Daniel Horecki <morr@morr.pl>
This commit is contained in:
@@ -413,10 +413,10 @@ pub fn run_nix(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
|
|
||||||
debug!("Nix version: {:?}", version);
|
debug!("Nix version: {:?}", version);
|
||||||
|
|
||||||
let mut packages = "--all";
|
let mut packages: Vec<&str> = vec!["--all", "--impure"];
|
||||||
|
|
||||||
if !matches!(version, Ok(version) if version >= Version::new(2, 21, 0)) {
|
if !matches!(version, Ok(version) if version >= Version::new(2, 21, 0)) {
|
||||||
packages = ".*";
|
packages = vec![".*"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if Path::new(&manifest_json_path).exists() {
|
if Path::new(&manifest_json_path).exists() {
|
||||||
@@ -425,7 +425,7 @@ pub fn run_nix(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
.args(nix_args())
|
.args(nix_args())
|
||||||
.arg("profile")
|
.arg("profile")
|
||||||
.arg("upgrade")
|
.arg("upgrade")
|
||||||
.arg(packages)
|
.args(&packages)
|
||||||
.arg("--verbose")
|
.arg("--verbose")
|
||||||
.status_checked()
|
.status_checked()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user