Skip to content

Commit

Permalink
CLI - Print out config path when saving (#1673)
Browse files Browse the repository at this point in the history
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
  • Loading branch information
bfops and bfops authored Sep 19, 2024
1 parent 63a4a03 commit cb3ca4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,7 @@ impl Config {

let config = toml::to_string_pretty(&self.home).unwrap();

eprintln!("Saving config to {}.", home_path.display());
// TODO: We currently have a race condition if multiple processes are modifying the config.
// If process X and process Y read the config, each make independent changes, and then save
// the config, the first writer will have its changes clobbered by the second writer.
Expand All @@ -863,7 +864,7 @@ impl Config {
// We should address this issue, but we currently don't expect it to arise very frequently
// (see https://github.com/clockworklabs/SpacetimeDB/pull/1341#issuecomment-2150857432).
if let Err(e) = atomic_write(&home_path, config) {
eprintln!("could not save config file: {e}")
eprintln!("Could not save config file: {e}")
}
}

Expand Down

2 comments on commit cb3ca4d

@github-actions
Copy link

@github-actions github-actions bot commented on cb3ca4d Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmarking failed. Please check the workflow run for details.

@github-actions
Copy link

@github-actions github-actions bot commented on cb3ca4d Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmarking failed. Please check the workflow run for details.

Please sign in to comment.