Skip to content

Commit d10b10b

Browse files
committed
In spin new/add, display only templates compatible with current command
Signed-off-by: itowlson <[email protected]>
1 parent c4aa295 commit d10b10b

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)