Skip to content

Commit

Permalink
Merge pull request #2984 from itowlson/templates-dont-offer-when-does…
Browse files Browse the repository at this point in the history
…nt-have-variant

In spin new/add, display only templates compatible with current command
  • Loading branch information
vdice authored Jan 21, 2025
2 parents c4aa295 + d10b10b commit 0817a0e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/commands/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ async fn prompt_template(

let opts = templates
.iter()
.filter(|t| t.supports_variant(variant))
.map(|t| format!("{} ({})", t.id(), t.description_or_empty()))
.collect::<Vec<_>>();
let noun = variant.prompt_noun();
Expand Down

0 comments on commit 0817a0e

Please sign in to comment.