Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
Check for deployment names with _ #30
Browse files Browse the repository at this point in the history
  • Loading branch information
John Bresnahan committed Jan 2, 2018
1 parent 9204435 commit 545228a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,11 @@ func (cliContext *CliContext) Logf(level int, format string, v ...interface{}) {

func (cliContext *CliContext) nameValidate(a *kingpin.CmdClause) error {
if len(cliContext.DeploymentName) > 20 {
return fmt.Errorf("Could the deployment name must be less than 20 characters")
return fmt.Errorf("The deployment name must be less than 20 characters")
}
// We may want to make this into a regex if otehr characters are problematic
if strings.Contains(cliContext.DeploymentName, "_") {
return fmt.Errorf("The deployment name must not contain a _")
}
return nil
}
Expand All @@ -577,7 +581,6 @@ func (cliContext *CliContext) envValidate(a *kingpin.CmdClause) error {
return fmt.Errorf("The environment variable must have the form 'key=value'")
}
}

return nil
}

Expand Down

0 comments on commit 545228a

Please sign in to comment.