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
@@ -36,6 +36,7 @@ func (r *RootCmd) templateEdit() *serpent.Command {
|
||||
requireActiveVersion bool
|
||||
deprecationMessage string
|
||||
disableEveryone bool
|
||||
orgContext = NewOrganizationContext()
|
||||
)
|
||||
client := new(codersdk.Client)
|
||||
|
||||
@@ -77,7 +78,7 @@ func (r *RootCmd) templateEdit() *serpent.Command {
|
||||
}
|
||||
}
|
||||
|
||||
organization, err := CurrentOrganization(r, inv, client)
|
||||
organization, err := orgContext.Selected(inv, client)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("get current organization: %w", err)
|
||||
}
|
||||
@@ -324,6 +325,7 @@ func (r *RootCmd) templateEdit() *serpent.Command {
|
||||
},
|
||||
cliui.SkipPromptOption(),
|
||||
}
|
||||
orgContext.AttachOptions(cmd)
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user