iomentum / cargo-scaffold

cargo scaffold lets you scaffold and generate projects described in a simple TOML file
MIT License
57 stars 12 forks source link

Unexpected Argument of git repo #51

Closed Sulbigar closed 8 months ago

Sulbigar commented 8 months ago

Team, I'm trying to create an apollo custom router scaffold by following the instructions in their doc. It fails with the below error.

cargo scaffold https://github.com/apollographql/router.git -r apollo-router-scaffold/templates/base -t main
error: unexpected argument 'https://github.com/apollographql/router.git' found

Usage: cargo-scaffold [OPTIONS] <template>

For more information, try '--help'.

Anything changed recently which changed the format of the command. In the help I do not see an option to mention the root of a git repo. Kindly advise.

Sulbigar commented 8 months ago

Even if I clone the repo and do a cargo scaffold by pointing it to local repo. It is failing. Something seems to be broken. Can you kindly advice?

cargo-scaffold scaffold router/apollo-router-scaffold/templates/base
error: unexpected argument 'router/apollo-router-scaffold/templates/base' found

Usage: cargo-scaffold [OPTIONS] <template>

For more information, try '--help'.
Sulbigar commented 8 months ago

All the above is on a MacBook.

bnjjj commented 8 months ago

@Sulbigar which version of cargo scaffold are you using ?

bnjjj commented 8 months ago

Thanks @Sulbigar for this issue. I was able to reproduce and I fixed it. Could you try to install the latest version of cargo-scaffold with cargo install -f cargo-scaffold. And it should work. If not feel free to reopen this issue

Sulbigar commented 8 months ago

It was on the then latest version 0.11. I will validate the fix and confirm. Thank You.