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() {
|
||||
return None;
|
||||
}
|
||||
let packages: Option<Vec<String>> = result
|
||||
let packages: Vec<String> = result
|
||||
.lines()
|
||||
.map(|line| {
|
||||
let package = line.split_whitespace().next()?;
|
||||
Some(package.rsplit_once('.')?.0.to_string())
|
||||
line.split_whitespace()
|
||||
.next()
|
||||
.unwrap()
|
||||
.rsplit_once('.')
|
||||
.unwrap()
|
||||
.0
|
||||
.to_string()
|
||||
})
|
||||
.collect();
|
||||
let Some(packages) = packages else {
|
||||
eprintln!(
|
||||
"Unexpected output from nix-index:\n {}",
|
||||
result.replace("\n", "\n ")
|
||||
);
|
||||
return None;
|
||||
};
|
||||
|
||||
if packages.is_empty() {
|
||||
None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue