Skip to content

Commit

Permalink
Merge pull request #4274 from systeminit/fix(sdf)--Don't-overwrite-sd…
Browse files Browse the repository at this point in the history
…f-config-file-with-empty-args

fix(sdf): Don't overwrite sdf config file with empty args
  • Loading branch information
stack72 authored Aug 2, 2024
2 parents e37857a + 6a1ee73 commit a544ef3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bin/sdf/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,12 @@ impl TryFrom<Args> for Config {
config_map.set("create_workspace_permissions", create_workspace_permissions);
}

config_map.set(
"create_workspace_allowlist",
args.create_workspace_allowlist,
);
if !args.create_workspace_allowlist.is_empty() {
config_map.set(
"create_workspace_allowlist",
args.create_workspace_allowlist,
);
}

config_map.set("nats.connection_name", NAME);
config_map.set("pg.application_name", NAME);
Expand Down
2 changes: 2 additions & 0 deletions bin/sdf/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ async fn async_main() -> Result<()> {

let config = Config::try_from(args)?;

debug!(config =?config, "entire startup config");

let encryption_key = Server::load_encryption_key(config.crypto().clone()).await?;
let jwt_public_signing_key =
Server::load_jwt_public_signing_key(config.jwt_signing_public_key().clone()).await?;
Expand Down

0 comments on commit a544ef3

Please sign in to comment.