diff --git a/app/app.go b/app/app.go index f3e0a569..69fde420 100644 --- a/app/app.go +++ b/app/app.go @@ -8,5 +8,5 @@ type application struct { // App (Application) interface var App application = application{ Name: "odin", - Version: "1.3.2", + Version: "1.3.3", } diff --git a/internal/command/commands/env.go b/internal/command/commands/env.go index b273a922..2f7ac2f0 100644 --- a/internal/command/commands/env.go +++ b/internal/command/commands/env.go @@ -63,8 +63,8 @@ func (e *Env) Run(args []string) int { e.Logger.Error("Env Name should not be of length more than 9") return 1 } - if (utils.SearchString(*name, "^[a-z][a-z0-9-]*$")) == "nil" { - e.Logger.Error("Env name only allows lower case alphabets, numbers and '-'. And should start with an alphabet.") + if (utils.SearchString(*name, "^[a-z]([a-z0-9-]*[a-z0-9])?$")) == "nil" { + e.Logger.Error("Env name only allows lower case alphabets, numbers and '-'. Should start with an alphabet and not end with a hyphen.") return 1 } envConfig := environment.Env{