src/CommandBuilder.php
public function getEnvironment(string $operatingSystem): EnvironmentInterface
    {
        $environmentList = [
            new UnixEnvironment()
        ];

        /** @var EnvironmentInterface $environment */
        $environment = null;
        foreach ($environmentList as $possibleEnvironment) {
            if (in_array($operatingSystem, $possibleEnvironment->getSupportedList())) {
                $environment = $possibleEnvironment;
            }
        }

        if (is_null($environment)) {
            throw new \RuntimeException(
                'Unable to find Environment for OS "' . $operatingSystem . '".'.
                'Try explicitly providing an Environment when instantiating the builder.'
            );
        }

        return $environment;
    }
public function getEnvironment(string $operatingSystem): EnvironmentInterface
    {
        $environmentList = [
            new UnixEnvironment()
        ];

        /** @var EnvironmentInterface $environment */
        $environment = null;
        foreach ($environmentList as $possibleEnvironment) {
            if (in_array($operatingSystem, $possibleEnvironment->getSupportedList())) {
                $environment = $possibleEnvironment;
            }
        }

        if (is_null($environment)) {
            throw new \RuntimeException(
                'Unable to find Environment for OS "' . $operatingSystem . '".'.
                'Try explicitly providing an Environment when instantiating the builder.'
            );
        }

        return $environment;
    }
Build the correct Environment instance for the provided operating system.