Skip to content

Commit

Permalink
Merge pull request #37 from tatsuya0619:login-panic
Browse files Browse the repository at this point in the history
Fix login panic which happens when `~/.config` doesn't exist
  • Loading branch information
tanakh authored Sep 19, 2020
2 parents 79e4f50 + 102c0c9 commit 169480d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ fn config_path() -> Result<PathBuf> {
.join("cargo-atcoder.toml");

if !config_path.exists() {
fs::create_dir_all(config_path.parent().unwrap())?;
fs::write(&config_path, DEFAULT_CONFIG_STR)?;
}

Expand Down

0 comments on commit 169480d

Please sign in to comment.