Skip to content

Commit

Permalink
please: trim the environmentURL
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbatm committed May 1, 2019
1 parent 267470b commit 3829824
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions command/please.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ func CmdPlease(c *cli.Context) (err error) {
EnvironmentURL: refString(environmentURL),
//AutoInactive: refBool(true),
})
if err != nil {
log.Println("updateStatus:", err)
}
return err
}

// Start deploy script
err = cmd.Start()
if err != nil {
updateStatus(StateError, "")
err2 := updateStatus(StateError, "")
if err2 != nil {
log.Println("updateStatus:", err)
}
return err
}

Expand All @@ -132,13 +132,16 @@ func CmdPlease(c *cli.Context) (err error) {
// Wait on the deploy to finish
err = cmd.Wait()
if err != nil {
updateStatus(StateFailure, "")
err2 := updateStatus(StateFailure, "")
if err2 != nil {
log.Println("updateStatus:", err)
}
return err
}

// Success!
out := strings.SplitN(stdout.String(), "\n", 2)
environmentURL := out[0]
environmentURL := strings.TrimSpace(out[0])
err = updateStatus(StateSuccess, environmentURL)
return err
}

0 comments on commit 3829824

Please sign in to comment.