Skip to content

Commit 0817a0e

Browse files
authored
Merge pull request #2984 from itowlson/templates-dont-offer-when-doesnt-have-variant
In spin new/add, display only templates compatible with current command
2 parents c4aa295 + d10b10b commit 0817a0e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/commands/new.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ async fn prompt_template(
319319

320320
let opts = templates
321321
.iter()
322+
.filter(|t| t.supports_variant(variant))
322323
.map(|t| format!("{} ({})", t.id(), t.description_or_empty()))
323324
.collect::<Vec<_>>();
324325
let noun = variant.prompt_noun();

0 commit comments

Comments
 (0)