Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 3, 2022

Conversation

dwahler
Copy link
Contributor

@dwahler dwahler commented Jun 3, 2022

Allow passing either workspace or username/workspace to CLI commands such as coder delete that take a workspace name as argument. (Not including coder create, since our API currently doesn't support creating workspaces owned by other users.)

Fixes #1424

@dwahler dwahler requested a review from a team June 3, 2022 17:11
cli/root.go Outdated
owner = parts[0]
name = parts[1]
default:
return codersdk.Workspace{}, xerrors.New("invalid workspace name")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be helpful to include this!

Suggested change
return codersdk.Workspace{}, xerrors.New("invalid workspace name")
return codersdk.Workspace{}, xerrors.New("invalid workspace name: %q", identifier)

@dwahler dwahler merged commit 582d636 into main Jun 3, 2022
@dwahler dwahler deleted the david/1424-cli-workspace-namespaces branch June 3, 2022 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coder delete doesn't accept fully qualified workspace name
3 participants