Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default sub template is not automatically used in silent mode (without user interaction) #1181

Open
2 of 3 tasks
Andrew15-5 opened this issue Apr 29, 2024 · 0 comments
Open
2 of 3 tasks

Comments

@Andrew15-5
Copy link
Contributor

Describe the bug

https://cargo-generate.github.io/cargo-generate/usage.html#templates-in-subfolders:

Multiple sub-templates can also be configured in the cargo-generate.toml file like this:

[template]
sub_templates = ["folder1", "folder2"]

Doing so also sets the order when cargo-generate asks what to expand, while the first option will be the default.

Running CLI in silent mode it will still ask for the sub template even if the first should be selected as a default one.

make sure you

  • I'm on the latest rust version rustup update
  • I'm on the latest cargo-generate version cargo install cargo-generate
  • In case you have an own .gitconfig, provide all sections that contains one of: insteadOf, url

To Reproduce
Steps to reproduce the behavior:

  1. cargo-generate generate -s -n name dioxuslabs/dioxus-template
  2. output it generated..
⚠   Favorite `dioxuslabs/dioxus-template` not found in config, using it as a git repository: https://github.com/dioxuslabs/dioxus-template.git
? 🤷   Which sub-template should be expanded? ›
❯ Web
  Liveview
  Fullstack
  Desktop
  TUI
  1. See error user interaction

Expected behavior
No user interaction, default sub template should be used.

Desktop (please complete the following information):

  • OS: Pop!_OS
  • Version: 22.04
  • Build tools: gnu
  • Shell: zsh
  • rustc --version: 1.80.0-nightly (1fffb2a35 2024-04-28)
  • cargo generate --version: 0.20.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant