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 {
|
||||
return "", fmt.Errorf(`invalid project root %s="%s": %w`, bricksRoot, path, err)
|
||||
}
|
||||
} else {
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
path, err = folders.FindDirWithLeaf(wd, ConfigFile)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf(`unable to locate project root`)
|
||||
}
|
||||
return path, nil
|
||||
}
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
path, err = folders.FindDirWithLeaf(wd, ConfigFile)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf(`unable to locate project root`)
|
||||
}
|
||||
|
||||
return path, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue