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

Cargo Doesn't Use Custom Package Name? #11

Open
JimLynchCodes opened this issue May 17, 2023 · 2 comments
Open

Cargo Doesn't Use Custom Package Name? #11

JimLynchCodes opened this issue May 17, 2023 · 2 comments

Comments

@JimLynchCodes
Copy link
Contributor

Hi again! 😃

I have a new exploration spike project now in which I am testing out the -n flag.

I deployed with this command:

rust-to-npm-cli deploy -b -n other-name-jims-rust-to-npm-cli-test

npm seems to work great. I install with:

npm i -g other-name-jims-rust-to-npm-cli-test

and then use it like this:

jims-new-rust-cli-test

For Cargo I would expect to be able to do this:

cargo install other-name-jims-rust-to-npm-cli-test

But instead, Cargo doesn't respect the -n flag. Instead, it wants me install with this:

cargo install jims-new-rust-cli-test

So, I am wondering... is it by design that the cargo package doesn't use the custom name? It is like an anti-pattern for me to want to do this in the first place? Or is it some limitation of cargo that you cannot publish with these two things having different names?

Just curious why it is like this because it seems unintuitive to me.

Thanks!

@j-mendez
Copy link
Contributor

@JimLynchCodes hi, by design we currently do not modify the cargo file. One option is we can pass in a temp file for the deployment or look into adding a flag to overwrite or modify in place.

@JimLynchCodes
Copy link
Contributor Author

I don't like the idea of having the build actually modify the file. I'd prefer if it deployed a temp file. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants