Skip to content
Snippets Groups Projects
Commit fa6d1a69 authored by Alex Clemmer's avatar Alex Clemmer Committed by GitHub
Browse files

Merge pull request #160 from jessicayuen/env-set-fix

Fix 'env set' where --name flag is not specified
parents 73e75ee2 e5e1a1c1
No related branches found
No related tags found
No related merge requests found
......@@ -246,14 +246,14 @@ func (m *manager) SetEnvironment(name string, desired *Environment) error {
return fmt.Errorf("Environment '%s' does not exist", name)
}
// ensure new environment name does not contain punctuation
if !isValidName(desired.Name) {
return fmt.Errorf("Environment name '%s' is not valid; must not contain punctuation, spaces, or begin or end with a slash", name)
}
// If the name has changed, the directory location needs to be moved to
// reflect the change.
if name != desired.Name && len(desired.Name) != 0 {
// ensure new environment name does not contain punctuation
if !isValidName(desired.Name) {
return fmt.Errorf("Environment name '%s' is not valid; must not contain punctuation, spaces, or begin or end with a slash", name)
}
log.Infof("Setting environment name from '%s' to '%s'", name, desired.Name)
// Ensure not overwriting another environment
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment