Skip to content

Conversation

@itowlson
Copy link
Collaborator

This addresses an issue noted by @tschneidereit (#2970 (comment)) - if you run spin add or spin new without a template ID, it prompts you for a template, but the prompt lists all templates regardless of if they support the current command variant. For example, if you do a spin add, it lists http-grain even though that template is currently new-only1.

This PR filters the selection list based on whether a template supports the current variant.

Footnotes

  1. Because laziness that is why.

@itowlson
Copy link
Collaborator Author

I believe the CI failures are spurious. The Go failure has a fix waiting to be merged, and the JS ones seem to have started today.

Copy link
Contributor

@tschneidereit tschneidereit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thank you!

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson itowlson force-pushed the templates-dont-offer-when-doesnt-have-variant branch from f5f501c to d10b10b Compare January 21, 2025 18:51
@itowlson
Copy link
Collaborator Author

@fermyon/administrators The CI failures are verified spurious (shenanigans afoot in the JS SDK repo) - can someone force merge this please? Thanks!

@vdice vdice merged commit 0817a0e into spinframework:main Jan 21, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants