Created
December 27, 2013 16:53
-
-
Save cpuguy83/8149566 to your computer and use it in GitHub Desktop.
Add support for multiple ENV key/values in one line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (b *buildFile) CmdEnv(args string) error { | |
var env map[string]string | |
if err := json.Unmarshal([]byte(args), &env); err != nil { | |
env = []string{args} | |
} | |
if err := b.commit("", env, fm.Sprintf("ENV %v", env)); err != nil { | |
return err | |
} | |
b.config.Env = env | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment