set detectEnvironment to an array