mirror of
https://github.com/drone/drone-cli.git
synced 2024-11-23 09:21:56 +01:00
make error messages consistent
This commit is contained in:
parent
800d6949bd
commit
dfc6dbb934
@ -85,7 +85,7 @@ func deploy(c *cli.Context) error {
|
||||
}
|
||||
}
|
||||
if number == 0 {
|
||||
return fmt.Errorf("Cannot deploy failure build")
|
||||
return fmt.Errorf("Cannot deploy failure build.")
|
||||
}
|
||||
} else {
|
||||
number, err = strconv.Atoi(buildArg)
|
||||
@ -96,7 +96,7 @@ func deploy(c *cli.Context) error {
|
||||
|
||||
env := c.Args().Get(2)
|
||||
if env == "" {
|
||||
return fmt.Errorf("Please specify the target environment (ie production)")
|
||||
return fmt.Errorf("Error: Please specify the target environment (e.g. production).")
|
||||
}
|
||||
|
||||
params := internal.ParseKeyPair(c.StringSlice("param"))
|
||||
|
@ -79,7 +79,7 @@ func NewAutoscaleClient(c *cli.Context) (drone.Client, error) {
|
||||
}
|
||||
autoscaler := c.GlobalString("autoscaler")
|
||||
if autoscaler == "" {
|
||||
return nil, fmt.Errorf("Please provide the autoscaler address")
|
||||
return nil, fmt.Errorf("Please provide the autoscaler address.")
|
||||
}
|
||||
client.SetAddress(
|
||||
strings.TrimSuffix(autoscaler, "/"),
|
||||
@ -91,7 +91,7 @@ func NewAutoscaleClient(c *cli.Context) (drone.Client, error) {
|
||||
func ParseRepo(str string) (user, repo string, err error) {
|
||||
var parts = strings.Split(str, "/")
|
||||
if len(parts) != 2 {
|
||||
err = fmt.Errorf("Error: Invalid or missing repository. eg octocat/hello-world.")
|
||||
err = fmt.Errorf("Error: Invalid or missing repository (e.g. octocat/hello-world).")
|
||||
return
|
||||
}
|
||||
user = parts[0]
|
||||
|
Loading…
Reference in New Issue
Block a user