fix: use provided username when fetching workspaces (#12955)

This commit is contained in:
Kyle Carberry
2024-04-13 14:39:57 -04:00
committed by GitHub
parent 00fcf36999
commit d3790bb5be
6 changed files with 11 additions and 9 deletions

View File

@ -64,7 +64,7 @@ func (r *RootCmd) openVSCode() *serpent.Command {
// need to wait for the agent to start.
workspaceQuery := inv.Args[0]
autostart := true
workspace, workspaceAgent, err := getWorkspaceAndAgent(ctx, inv, client, autostart, codersdk.Me, workspaceQuery)
workspace, workspaceAgent, err := getWorkspaceAndAgent(ctx, inv, client, autostart, workspaceQuery)
if err != nil {
return xerrors.Errorf("get workspace and agent: %w", err)
}