mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: remove org context switcher in the cli (#13674)
* chore: remove org context switcher in the cli
This commit is contained in:
+3
-1
@@ -34,6 +34,7 @@ func (r *RootCmd) templatePush() *serpent.Command {
|
||||
provisionerTags []string
|
||||
uploadFlags templateUploadFlags
|
||||
activate bool
|
||||
orgContext = NewOrganizationContext()
|
||||
)
|
||||
client := new(codersdk.Client)
|
||||
cmd := &serpent.Command{
|
||||
@@ -46,7 +47,7 @@ func (r *RootCmd) templatePush() *serpent.Command {
|
||||
Handler: func(inv *serpent.Invocation) error {
|
||||
uploadFlags.setWorkdir(workdir)
|
||||
|
||||
organization, err := CurrentOrganization(r, inv, client)
|
||||
organization, err := orgContext.Selected(inv, client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -226,6 +227,7 @@ func (r *RootCmd) templatePush() *serpent.Command {
|
||||
cliui.SkipPromptOption(),
|
||||
}
|
||||
cmd.Options = append(cmd.Options, uploadFlags.options()...)
|
||||
orgContext.AttachOptions(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user