Skip to content

Commit b2d7ce4

Browse files
committed
search.rs: include platforms in search results
To avoid a breaking change that people might not like, introducing a `platforms` flag to gate search change.
1 parent 75d3402 commit b2d7ce4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/interface.rs

+4
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ pub struct SearchArgs {
180180
/// Name of the channel to query (e.g nixos-23.11, nixos-unstable, etc)
181181
pub channel: String,
182182

183+
#[arg(long, short = 'P')]
184+
/// Show supported platforms for each package
185+
pub platforms: bool,
186+
183187
/// Name of the package to search
184188
pub query: Vec<String>,
185189
}

src/search.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl SearchArgs {
177177
}
178178
}
179179

180-
if !elem.package_platforms.is_empty() {
180+
if self.platforms && !elem.package_platforms.is_empty() {
181181
println!(" Platforms: {}", elem.package_platforms.join(", "));
182182
}
183183

0 commit comments

Comments
 (0)