From 0d52bb02c79f8840e2f12d4bcb3a0776863e6390 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 1 Jul 2024 16:46:43 -0500 Subject: [PATCH] hotfix: remove database import from cli Cli was using a utility function from a database package. --- cli/root.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/root.go b/cli/root.go index a58312a287c35..4d95aff30e398 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" @@ -659,9 +658,10 @@ func (o *OrganizationContext) Selected(inv *serpent.Invocation, client *codersdk }) if index < 0 { - names := db2sdk.List(orgs, func(f codersdk.Organization) string { - return f.Name - }) + var names []string + for _, org := range orgs { + names = append(names, org.Name) + } return codersdk.Organization{}, xerrors.Errorf("organization %q not found, are you sure you are a member of this organization? "+ "Valid options for '--org=' are [%s].", o.FlagSelect, strings.Join(names, ", ")) }