Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI - Print out config path when saving #1673

Merged
merged 3 commits into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading