mirror of https://github.com/databricks/cli.git
reorder to improve readability
This commit is contained in:
parent
e49f2f3110
commit
97c8042fd6
|
@ -67,9 +67,7 @@ func fetchRepositoryInfoAPI(ctx context.Context, path vfs.Path, w *databricks.Wo
|
||||||
|
|
||||||
// Check if GitInfo is present and extract relevant fields
|
// Check if GitInfo is present and extract relevant fields
|
||||||
gi := response.GitInfo
|
gi := response.GitInfo
|
||||||
if gi == nil {
|
if gi != nil {
|
||||||
log.Warnf(ctx, "Failed to load git info from %s", apiEndpoint)
|
|
||||||
} else {
|
|
||||||
fixedPath := ensureWorkspacePrefix(gi.Path)
|
fixedPath := ensureWorkspacePrefix(gi.Path)
|
||||||
return GitRepositoryInfo{
|
return GitRepositoryInfo{
|
||||||
OriginURL: gi.URL,
|
OriginURL: gi.URL,
|
||||||
|
@ -79,6 +77,7 @@ func fetchRepositoryInfoAPI(ctx context.Context, path vfs.Path, w *databricks.Wo
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Warnf(ctx, "Failed to load git info from %s", apiEndpoint)
|
||||||
return GitRepositoryInfo{
|
return GitRepositoryInfo{
|
||||||
WorktreeRoot: path,
|
WorktreeRoot: path,
|
||||||
}, nil
|
}, nil
|
||||||
|
|
Loading…
Reference in New Issue