From bc3421b150572cc4232c3483f8f903fb16f46d74 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sun, 31 Jan 2021 03:34:38 +0300 Subject: [PATCH] chore: add simply logging --- migra-cli/src/config.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migra-cli/src/config.rs b/migra-cli/src/config.rs index 221fab1..6bd5619 100644 --- a/migra-cli/src/config.rs +++ b/migra-cli/src/config.rs @@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize}; use std::fs; use std::path::Path; -const MIGRA_TOML_FILENAME: &str = "migra.toml"; +const MIGRA_TOML_FILENAME: &str = "Migra.toml"; #[derive(Debug, Serialize, Deserialize)] pub(crate) struct Config { @@ -27,6 +27,7 @@ impl Config { pub fn initialize() -> Result<(), Box> { if Path::new(MIGRA_TOML_FILENAME).exists() { + println!("{} already exists", MIGRA_TOML_FILENAME); return Ok(()); } @@ -34,6 +35,8 @@ impl Config { let content = toml::to_string(&config)?; fs::write(MIGRA_TOML_FILENAME, content)?; + println!("Created {}", MIGRA_TOML_FILENAME); + Ok(()) } }