juju/juju — pull request #560 by jameinel (2014-08-20 13:33:33+00:00)
Title: Fixes bug #1359170.

I ended up running into bug #1359170 while I was trying to run the charm-tools plugins.

Those tools are about creating a charm and proofing it, etc. They don't have any need for an Environment to be set. However, we have a bug in our code that if there isn't an Environment known, then environmentCommandWrapper.Init() fails with an error and never calls the wrapped command .Init().
Going further, we *also* then just ignore that error, but keep trying to do whatever it was that we were trying, except now with no "args" to pass to the command.

This fixes that bug, but I'd like feedback from Tim about what a *correct* fix looks like.

Note that in order to not have an environment set, you have to *not* use stuff like "juju switch". I personally disable the default environment and the switch file because I want to manually specify the environment for each command, so that in my bash history it is clear what environment I was running on.

So this might not be a critical bug, if our standard recommended use is to require an environment to be set, but it is a bug *for me*.