Skip to content

Commit 5898cf2

Browse files
authored
Merge pull request #135 from DeterminateSystems/global-env-vars
Add env vars for global variables
2 parents 8d9ac69 + ad47aa2 commit 5898cf2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/cli/cmd/list.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub(crate) struct ListSubcommand {
2727
cmd: Subcommands,
2828

2929
/// Output results as JSON.
30-
#[arg(long, global = true, env = "FH_JSON_OUTPUT")]
30+
#[arg(long, global = true, env = "FH_OUTPUT_JSON")]
3131
json: bool,
3232

3333
#[arg(from_global)]

src/cli/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pub(crate) struct Cli {
1313
global = true,
1414
long,
1515
default_value = "https://api.flakehub.com",
16+
env = "FH_API_ADDR",
1617
hide = true
1718
)]
1819
pub api_addr: url::Url,
@@ -24,6 +25,7 @@ pub(crate) struct Cli {
2425
global = true,
2526
long,
2627
default_value = "https://cache.flakehub.com",
28+
env = "FH_CACHE_ADDR",
2729
hide = true
2830
)]
2931
pub cache_addr: url::Url,
@@ -35,6 +37,7 @@ pub(crate) struct Cli {
3537
global = true,
3638
long,
3739
default_value = "https://flakehub.com",
40+
env = "FH_FRONTEND_ADDR",
3841
hide = true
3942
)]
4043
pub frontend_addr: url::Url,

0 commit comments

Comments
 (0)