diff --git a/cliparser/cliparser.go b/cliparser/cliparser.go index 15577e3..c8ccfac 100644 --- a/cliparser/cliparser.go +++ b/cliparser/cliparser.go @@ -89,11 +89,11 @@ func ParseCliArguments(args []string) (cliArguments CliArguments, err error) { deleteStack = app.Command(DestroyStackMode, "Deletes a stack on aws") deleteStackName = deleteStack.Arg("stack", "An AWS stack name.").Required().String() - updateStack = app.Command(UpdateStackMode, "Updates a stacj on aws") - updateStackName = updateStack.Arg("stack", "An AWS stack name").String() - updateStackTemplate = updateStack.Arg("template", "A path to the template file.").String() - updateStackImpName = updateStack.Flag("stack", "Sn AWS stack name.").String() - updateStackImpTemplate = updateStack.Flag("template", "A path to the template file.").String() + updateStack = app.Command(UpdateStackMode, "Updates a stack on aws") + updateStackName = updateStack.Arg("stack", "An AWS stack name").String() + updateStackTemplate = updateStack.Arg("template", "A path to the template file.").String() + updateStackImpName = updateStack.Flag("stack", "Sn AWS stack name.").String() + updateStackImpTemplate = updateStack.Flag("template", "A path to the template file.").String() updateStackCapabilities = updateStack.Flag("capabilities", "Capabilities: CAPABILITY_IAM | CAPABILITY_NAMED_IAM").Enums("CAPABILITY_IAM", "CAPABILITY_NAMED_IAM") mfaCommand = app.Command(MfaMode, "Create temporary secure credentials with MFA.") @@ -141,10 +141,10 @@ func ParseCliArguments(args []string) (cliArguments CliArguments, err error) { case mfaCommand.FullCommand(): cliArguments.Mode = &MfaMode - // update Stack case updateStack.FullCommand(): - cliArguments.Capabilities = updateStackCapabilities; + cliArguments.Mode = &UpdateStackMode + cliArguments.Capabilities = updateStackCapabilities if len(*updateStackImpTemplate) > 0 && len(*updateStackImpName) > 0 { cliArguments.Stack = updateStackImpName cliArguments.TemplatePath = updateStackImpTemplate diff --git a/main.go b/main.go index 680d93a..a1c2c79 100644 --- a/main.go +++ b/main.go @@ -25,10 +25,10 @@ import ( "github.com/Appliscale/perun/configurator" "github.com/Appliscale/perun/context" "github.com/Appliscale/perun/converter" + "github.com/Appliscale/perun/mysession" "github.com/Appliscale/perun/offlinevalidator" "github.com/Appliscale/perun/onlinevalidator" "github.com/Appliscale/perun/stack" - "github.com/Appliscale/perun/mysession" ) func main() { diff --git a/mysession/mysession.go b/mysession/mysession.go index d9292fd..0327f61 100644 --- a/mysession/mysession.go +++ b/mysession/mysession.go @@ -2,16 +2,16 @@ package mysession import ( "errors" + "github.com/Appliscale/perun/cliparser" "github.com/Appliscale/perun/context" "github.com/Appliscale/perun/utilities" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/sts" "github.com/go-ini/ini" + "os" "os/user" "time" - "os" - "github.com/Appliscale/perun/cliparser" ) const dateFormat = "2006-01-02 15:04:05 MST"