Don't error in envcmd if we can't work out the environment until we actually need it.
inline the error checks.
Merge pull request #568 from howbazaar/fix-envcmd-ensure

Envcmd is more forgiving during init.

Don't error in envcmd if we can't work out the environment until we actually need it.