Skip to content

Commit

Permalink
Merge pull request #372 from jstewmon/credential-process-expiration
Browse files Browse the repository at this point in the history
use Expire() to set Expiration with --json flag
  • Loading branch information
lox committed May 21, 2019
2 parents 5a0643d + 9202cb6 commit 438ec49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func ExecCommand(app *kingpin.Application, input ExecCommandInput) {
SessionToken: val.SessionToken,
}
if !input.NoSession {
credentialData.Expiration = time.Now().UTC().Add(input.Duration).Format("2006-01-02T15:04:05Z")
credentialData.Expiration = creds.Expires().Format("2006-01-02T15:04:05Z")
}
json, err := json.Marshal(&credentialData)
if err != nil {
Expand Down

0 comments on commit 438ec49

Please sign in to comment.