mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-01 23:25:11 +01:00
revert: removed nix-index option wrapping
This commit is contained in:
parent
fcb01b9155
commit
6a4b51d340
1 changed files with 8 additions and 10 deletions
|
|
@ -128,20 +128,18 @@ pub fn get_packages(
|
||||||
if result.is_empty() {
|
if result.is_empty() {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
let packages: Option<Vec<String>> = result
|
let packages: Vec<String> = result
|
||||||
.lines()
|
.lines()
|
||||||
.map(|line| {
|
.map(|line| {
|
||||||
let package = line.split_whitespace().next()?;
|
line.split_whitespace()
|
||||||
Some(package.rsplit_once('.')?.0.to_string())
|
.next()
|
||||||
|
.unwrap()
|
||||||
|
.rsplit_once('.')
|
||||||
|
.unwrap()
|
||||||
|
.0
|
||||||
|
.to_string()
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
let Some(packages) = packages else {
|
|
||||||
eprintln!(
|
|
||||||
"Unexpected output from nix-index:\n {}",
|
|
||||||
result.replace("\n", "\n ")
|
|
||||||
);
|
|
||||||
return None;
|
|
||||||
};
|
|
||||||
|
|
||||||
if packages.is_empty() {
|
if packages.is_empty() {
|
||||||
None
|
None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue