feat: support fully-qualified workspace names in CLI (#2036)

This commit is contained in:
David Wahler
2022-06-03 12:47:56 -05:00
committed by GitHub
parent fc38b61819
commit 582d636e54
12 changed files with 91 additions and 16 deletions

View File

@ -207,7 +207,7 @@ func getWorkspaceAndAgent(cmd *cobra.Command, client *codersdk.Client, orgID uui
return codersdk.Workspace{}, codersdk.WorkspaceAgent{}, err
}
} else {
workspace, err = client.WorkspaceByOwnerAndName(cmd.Context(), orgID, userID, workspaceParts[0])
workspace, err = namedWorkspace(cmd, client, orgID, workspaceParts[0])
if err != nil {
return codersdk.Workspace{}, codersdk.WorkspaceAgent{}, err
}