public function getProcess()
    {
        $this->processBuilder->setArguments(array());

        foreach ($this->options as $option => $value) {
            if (!$value) {
                continue;
            }

            if (!in_array($option, static::$nonPrefixedOptions)) {
                $option = sprintf('--%s', $option);
            }

            $this->processBuilder->add($option);

            if (true !== $value) {
                $this->processBuilder->add($value);
            }
        }

        $this->processBuilder->add('-')->add($this->getOutput());

        $process = $this->processBuilder->getProcess();
        $process->setCommandLine(sprintf('echo "%s" | %s', addslashes($this->getInput()), $process->getCommandLine()));

        return $process;
    }