puppetlabs/puppet — pull request #3187 by zaphod42 (2014-10-13 18:51:33+00:00)
Title: (PUP-3244) Allow autoload to handle missing environment

When a previous commit changed from get() to get!() the agent stopped being
able to use an environment that is available on the master, but not available
locally. I had misread the code and missed a trailing
`&&`. This caused me to think that the environment lookup in this case was
required, where in fact it is still optional.

This changes the structure of the code to make it much clearer that the
environment is optional, changes from get!() to get(), and adds some tests
around these code paths.