chore: remove org context switcher in the cli (#13674)

* chore: remove org context switcher in the cli
This commit is contained in:
Steven Masley
2024-07-01 16:04:45 -05:00
committed by GitHub
parent 4a0fd7466c
commit 5bf46f360a
52 changed files with 353 additions and 362 deletions
+3 -1
View File
@@ -20,6 +20,7 @@ func (r *RootCmd) templatePull() *serpent.Command {
tarMode bool
zipMode bool
versionName string
orgContext = NewOrganizationContext()
)
client := new(codersdk.Client)
@@ -45,7 +46,7 @@ func (r *RootCmd) templatePull() *serpent.Command {
return xerrors.Errorf("either tar or zip can be selected")
}
organization, err := CurrentOrganization(r, inv, client)
organization, err := orgContext.Selected(inv, client)
if err != nil {
return xerrors.Errorf("get current organization: %w", err)
}
@@ -187,6 +188,7 @@ func (r *RootCmd) templatePull() *serpent.Command {
},
cliui.SkipPromptOption(),
}
orgContext.AttachOptions(cmd)
return cmd
}