Commit Graph

5 Commits

Author SHA1 Message Date
James Bardin 9d118325b3 Reject names that aren't url-safe
Environment names can be used in a number of contexts, and should be
properly escaped for safety. Since most state names are store in path
structures, and often in a URL, use `url.PathEscape` to check for
disallowed characters
2017-03-27 18:00:56 -04:00
Mitchell Hashimoto 1f614bd4d6
command: color changes, trimming newlines 2017-03-01 12:59:40 -08:00
James Bardin b53704ed87 Thread the environment through all commands
Add Env and SetEnv methods to command.Meta to retrieve the current
environment name inside any command.

Make sure all calls to Backend.State contain an environment name, and
make the package compile against the update backend package.
2017-02-28 16:35:46 -05:00
James Bardin 06663991d1 Add config path argument to env commands
In order to operate in parity with other commands, the env command
should take a path argument to locate the configuration.

This however introduces the issue of a possible name conflict between a
path and subcommand, or printing an incorrect current environment for
the bare `env` command. In favor of simplicity this removes the current
env output and only prints usage when no subcommand is provided.
2017-02-28 16:07:06 -05:00
James Bardin c8526484b3 split the env command into subcommands 2017-02-28 16:07:06 -05:00