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
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user