mirror of https://github.com/databricks/cli.git
Avoid panic if Config.Workspace.CurrentUser.User is not set (#1993)
## Changes Extra check to avoid panic if /api/2.0/preview/scim/v2/Me returns `{}` ## Tests Existing tests.
This commit is contained in:
parent
ad1359c1eb
commit
67f08ba924
|
@ -28,7 +28,7 @@ func (m *expandWorkspaceRoot) Apply(ctx context.Context, b *bundle.Bundle) diag.
|
|||
}
|
||||
|
||||
currentUser := b.Config.Workspace.CurrentUser
|
||||
if currentUser == nil || currentUser.UserName == "" {
|
||||
if currentUser == nil || currentUser.User == nil || currentUser.UserName == "" {
|
||||
return diag.Errorf("unable to expand workspace root: current user not set")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue