panamax
panamax copied to clipboard
Environment Variables example?
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 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.