We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ab46f5 commit 0bf4e28Copy full SHA for 0bf4e28
1 file changed
src/main.rs
@@ -38,14 +38,20 @@ fn main() -> Result<(), error::Error> {
38
let config_path = args.config.unwrap_or_else(Config::default_path);
39
info!("Loading config from {}", config_path.display());
40
41
- let config: Config = match confy::load_path(config_path) {
+ let first_run = !config_path.exists();
42
+ let config: Config = match confy::load_path(&config_path) {
43
Ok(config) => config,
44
Err(why) => {
45
error!("Failed to load configuration: {why}");
46
exit(1);
47
}
48
};
49
50
+ if first_run {
51
+ info!("Configuration initialized at {}", config_path.display());
52
+ return Ok(());
53
+ }
54
+
55
match args.command {
56
Some(Command::Service { command }) => svcmgr::main(command),
57
Some(Command::Database { command }) => dbmgr::main(command, &config),
0 commit comments