1119688: Improved exit code usage

- The EnvironmentCommand now returns the proper exit code when the
  server does not support environments.
- When the server does not support environments, the command will
  no longer log that it successfully retrieved the environments
  from the server.