Archived
1
0
Fork 0

fix: find exists manifest

This commit is contained in:
Dmitriy Pleshevskiy 2021-03-25 00:41:22 +03:00
parent c8c6765483
commit a29c65a9a7

View file

@ -80,12 +80,13 @@ fn recursive_find_project_root() -> MigraResult<PathBuf> {
impl Config { impl Config {
pub fn read(config_path: Option<PathBuf>) -> MigraResult<Config> { pub fn read(config_path: Option<PathBuf>) -> MigraResult<Config> {
let config_path = match config_path { let config_path = match config_path {
Some(mut config_path) if config_path.is_dir() => { Some(config_path) if config_path.is_dir() => {
config_path.push(MIGRA_TOML_FILENAME); Some(config_path.join(MIGRA_TOML_FILENAME))
Some(config_path)
} }
Some(config_path) => Some(config_path), Some(config_path) => Some(config_path),
None => recursive_find_project_root().ok(), None => recursive_find_project_root()
.map(|path| path.join(MIGRA_TOML_FILENAME))
.ok(),
}; };
match config_path { match config_path {