Restructuring role, working through Allow Role to Identity functionality
This commit is contained in:
7
role.go
7
role.go
@@ -109,6 +109,11 @@ func assumeRole(args []string) {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if apiresponse.Status != "success" {
|
||||
fmt.Printf("Error assuming role: %s\n", apiresponse.Message)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -223,6 +228,8 @@ func roleMain(args []string) {
|
||||
}
|
||||
subcommand := args[0]
|
||||
|
||||
fmt.Println("Sub command", subcommand)
|
||||
|
||||
cmd := findCommand(subcommand, roleCommands)
|
||||
if cmd == nil {
|
||||
fmt.Println("Error: unknown command:", subcommand)
|
||||
|
||||
Reference in New Issue
Block a user