We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
find_app
1 parent f88b740 commit 38f5829Copy full SHA for 38f5829
test/test-manager/src/package.rs
@@ -1,5 +1,6 @@
1
use crate::config::{Architecture, OsType, PackageType, VmConfig};
2
use anyhow::{Context, Result};
3
+use itertools::Itertools;
4
use once_cell::sync::Lazy;
5
use regex::Regex;
6
use std::path::{Path, PathBuf};
@@ -124,6 +125,7 @@ fn find_app(
124
125
// Skip for non-Linux, because there's only one package
126
!linux || matching_ident
127
}) // Skip file if it doesn't match the architecture
128
+ .sorted_unstable_by_key(|(_path, u8_path)| u8_path.len())
129
.find(|(_path, u8_path)| u8_path.contains(&app)) // Find match
130
.map(|(path, _)| path).context(if e2e_bin {
131
format!(
0 commit comments