cargo-dist icon indicating copy to clipboard operation
cargo-dist copied to clipboard

in init setup- offer to add repo key to Cargo.toml for those missing it

Open ashleygwilliams opened this issue 1 year ago • 1 comments

the number one error i see with end users is that they realize they are missing the repo key in their Cargo.toml or that it is incorrect. in general, cargo-dist has the info it needs to update this (as it is almost certainly running in a local git checkout) - for situations where we can safely and confidently offer to update Cargo.toml- i think we should do so in init

current:

✔ enable Github CI and Releases? · yes

  × Github CI support requires you to specify the URL of your repository
  help: Set the repository = "https://github.com/..." key in your Cargo.toml

proposal:

✔ enable Github CI and Releases? · yes

  ? You haven't specified a repository key in your Cargo.toml Set it to <repourl from local checkout>? · yes

ashleygwilliams avatar Jan 18 '24 19:01 ashleygwilliams

whoever does this should duplicate the logic to also fill in the "authors" (maybe actually prompt for this like we do for npm scopes) (...or "the {repo_name} authors"), that's the number one error with msi

Gankra avatar Jan 18 '24 19:01 Gankra