Closed xduugu closed 6 months ago
Hi!
Yes, this seems appropriate. I'll look into it some time soon.
I already have the plan to add a good part of cargo install
's CLI as dedicated configuration options, so that it can be used the easiest. However, having the possibility to pass extra arguments used after all the others would be useful in order to enable users to breach the gap in the meantime.
I therefore see two complementary things that should be done:
extra-arguments
optional configuration item that gives the list of arguments to add between the last cargo install
option and the following --
that separates the proper fixed arguments.environment
configuration key providing a map of environment variables that need to be set for the call to cargo install
specific to the current package. Environment variables that should be shared between all calls can simply be set externally.Hey @xduugu, sorry for the delay! I have now implemented both options in the mentioned commits. Does it work for what you wanted?
You can test it by installing the project with cargo install --git ...
. I will also publish a new release containing the recent changes in just a few moments.
This is now part of v0.7.0. Feel free to open a new issue in case there is something that does not work as expected.
@PaulDance, thanks a lot! It works as expected.
When testing the new functionality, I noticed that the example configuration in the README is not valid TOML syntax. Apparently, inline tables must not include newlines.
It works as expected.
Good!
the example configuration in the README is not valid TOML syntax.
Indeed, I did the change while not even thinking about that. I'll change it to be proper TOML. Thanks for the heads-up :slightly_smiling_face:
Description It is currently not possible to update gitui with cargo-liner, because cargo-liner does not use
cargo install
's--locked
option when installing packages and there is no possibility to set this option without changing the code. Please provide a way to pass options tocargo install
to fix this issue.Preferred solution The easiest solution probably would be to allow setting
cargo install
options via environment variable. For example, cargo-update use an environment variableCARGO_INSTALL_OPTS
for that.