protected function buildCommand($defaultBin, $action, $command)
    {
        $bin = $this->config->get('manager-bin', $defaultBin);
        $bin = Platform::isWindows() ? str_replace('/', '\\', $bin) : $bin;
        $gOptions = trim($this->config->get('manager-options', ''));
        $options = trim($this->config->get('manager-'.$action.'-options', ''));

        return $bin.' '.$command
            .(empty($gOptions) ? '' : ' '.$gOptions)
            .(empty($options) ? '' : ' '.$options);
    }