You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm interested in setting up my local mirror such that I can easily enable it by setting one environment variable, or disable it by unsetting it.
I have attempted to set it up as both a registry and a source, but the issue I'm running into is that I need to somehow set source.cargo-io's 'index' value via an environment variable. The docs say I should be able to set CARGO_SOURCE_<sourcename>_INDEX, but I am unsure how to represent the source name here. Using a -, such as CARGO_SOURCE_CRATES-IO_INDEX is invalid under linux, and replacing the dash with a single or double underscore, or omitting it entirely doesn't work.
How can I set the crates-io replacement key via environment variable? This would allow me to set up a source in my config but only to enable it when necessary.
Thanks.
The text was updated successfully, but these errors were encountered:
Unfortunately, I have no idea how to do this. For testing, in ~/.cargo I've just had a config.toml (with nothing in it) and a config file, and just moving the latter to config.bak whenever I didn't want to use the mirror. It's pretty hacky though.
Hello,
I'm interested in setting up my local mirror such that I can easily enable it by setting one environment variable, or disable it by unsetting it.
I have attempted to set it up as both a registry and a source, but the issue I'm running into is that I need to somehow set
source.cargo-io
's 'index' value via an environment variable. The docs say I should be able to setCARGO_SOURCE_<sourcename>_INDEX
, but I am unsure how to represent the source name here. Using a -, such asCARGO_SOURCE_CRATES-IO_INDEX
is invalid under linux, and replacing the dash with a single or double underscore, or omitting it entirely doesn't work.How can I set the crates-io replacement key via environment variable? This would allow me to set up a source in my config but only to enable it when necessary.
Thanks.
The text was updated successfully, but these errors were encountered: