Skip to content

Commit 0183ad9

Browse files
committed
Add CLI command 'config-path' to show the location of config.toml
1 parent 73a84f8 commit 0183ad9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bin/cli.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ enum Commands {
5151
HelpAll,
5252
ClearLogs,
5353
LogPath,
54+
ConfigPath,
5455
}
5556

5657
fn main() -> Result<()> {
@@ -249,6 +250,11 @@ fn main() -> Result<()> {
249250
dir.push(".zeta_crypto/logs.txt");
250251
println!("{}", dir.display());
251252
}
253+
Commands::ConfigPath => {
254+
let mut dir = dirs::home_dir().unwrap_or_else(|| std::path::PathBuf::from("."));
255+
dir.push(".zeta_crypto/config.toml");
256+
println!("{}", dir.display());
257+
}
252258
}
253259

254260
Ok(())

0 commit comments

Comments
 (0)