diff --git a/cli/root.go b/cli/root.go index 87a4f4b422b56..b2be952cf0e2d 100644 --- a/cli/root.go +++ b/cli/root.go @@ -29,7 +29,6 @@ import ( "golang.org/x/mod/semver" "golang.org/x/xerrors" - "github.com/coder/coder/v2/coderd/database/db2sdk" "github.com/coder/pretty" "github.com/coder/coder/v2/buildinfo" @@ -658,9 +657,11 @@ func (o *OrganizationContext) Selected(inv *serpent.Invocation, client *codersdk } // No org selected, and we are more than 1? Return an error. - validOrgs := db2sdk.List(orgs, func(org codersdk.Organization) string { - return fmt.Sprintf("%q", org.Name) - }) + validOrgs := make([]string, 0, len(orgs)) + for _, org := range orgs { + validOrgs = append(validOrgs, org.Name) + } + return codersdk.Organization{}, xerrors.Errorf("Must select an organization with --org=. Choose from: %s", strings.Join(validOrgs, ", ")) } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy