mirror of https://github.com/databricks/cli.git
Reduce nesting (#72)
This commit is contained in:
parent
6258a1637d
commit
f27cb7149d
|
@ -23,16 +23,15 @@ func getRoot() (string, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf(`invalid project root %s="%s": %w`, bricksRoot, path, err)
|
return "", fmt.Errorf(`invalid project root %s="%s": %w`, bricksRoot, path, err)
|
||||||
}
|
}
|
||||||
} else {
|
return path, nil
|
||||||
wd, err := os.Getwd()
|
}
|
||||||
if err != nil {
|
wd, err := os.Getwd()
|
||||||
return "", err
|
if err != nil {
|
||||||
}
|
return "", err
|
||||||
path, err = folders.FindDirWithLeaf(wd, ConfigFile)
|
}
|
||||||
if err != nil {
|
path, err = folders.FindDirWithLeaf(wd, ConfigFile)
|
||||||
return "", fmt.Errorf(`unable to locate project root`)
|
if err != nil {
|
||||||
}
|
return "", fmt.Errorf(`unable to locate project root`)
|
||||||
}
|
}
|
||||||
|
|
||||||
return path, nil
|
return path, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue