fix: find exists manifest
This commit is contained in:
parent
c8c6765483
commit
a29c65a9a7
1 changed files with 5 additions and 4 deletions
|
@ -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 {
|
||||||
|
|
Reference in a new issue