Skip to content

Commit

Permalink
Merge pull request #135 from DeterminateSystems/global-env-vars
Browse files Browse the repository at this point in the history
Add env vars for global variables
  • Loading branch information
lucperkins authored Aug 5, 2024
2 parents 8d9ac69 + ad47aa2 commit 5898cf2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/cmd/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub(crate) struct ListSubcommand {
cmd: Subcommands,

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

#[arg(from_global)]
Expand Down
3 changes: 3 additions & 0 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub(crate) struct Cli {
global = true,
long,
default_value = "https://api.flakehub.com",
env = "FH_API_ADDR",
hide = true
)]
pub api_addr: url::Url,
Expand All @@ -24,6 +25,7 @@ pub(crate) struct Cli {
global = true,
long,
default_value = "https://cache.flakehub.com",
env = "FH_CACHE_ADDR",
hide = true
)]
pub cache_addr: url::Url,
Expand All @@ -35,6 +37,7 @@ pub(crate) struct Cli {
global = true,
long,
default_value = "https://flakehub.com",
env = "FH_FRONTEND_ADDR",
hide = true
)]
pub frontend_addr: url::Url,
Expand Down

0 comments on commit 5898cf2

Please sign in to comment.