protected function runCommandInForeground(): int
    {
        $this->callBeforeCallbacks();

        $process = Process::fromShellCommandline(
            \trim($this->buildCommand(), ' &'),
            $this->path,
            null,
            null,
            null
        );

        $run = $process->run();

        $this->callAfterCallbacks();

        return $run;
    }