Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(160)

Unified Diff: cmd/juju/authorizedkeys_delete.go

Issue 92140043: Init EnvCommandBase.EnvName from envs.yaml
Patch Set: Init EnvCommandBase.EnvName from envs.yaml Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cmd/juju/authorizedkeys_add.go ('k') | cmd/juju/authorizedkeys_import.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmd/juju/authorizedkeys_delete.go
=== modified file 'cmd/juju/authorizedkeys_delete.go'
--- cmd/juju/authorizedkeys_delete.go 2014-04-25 06:39:01 +0000
+++ cmd/juju/authorizedkeys_delete.go 2014-05-08 09:27:50 +0000
@@ -10,6 +10,7 @@
"launchpad.net/gnuflag"
"launchpad.net/juju-core/cmd"
+ "launchpad.net/juju-core/cmd/envcmd"
"launchpad.net/juju-core/juju"
)
@@ -21,7 +22,7 @@
// DeleteKeysCommand is used to delete authorized ssh keys for a user.
type DeleteKeysCommand struct {
- cmd.EnvCommandBase
+ envcmd.EnvCommandBase
user string
keyIds []string
}
@@ -36,6 +37,9 @@
}
func (c *DeleteKeysCommand) Init(args []string) error {
+ if err := c.EnvCommandBase.EnsureEnvName(); err != nil {
+ return err
+ }
switch len(args) {
case 0:
return errors.New("no ssh key id specified")
« no previous file with comments | « cmd/juju/authorizedkeys_add.go ('k') | cmd/juju/authorizedkeys_import.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b