cmd instanceof UnixShell || $this->cmd instanceof WindowsCmd) { return $this->cmd->getLastCommand(); } return $this->cmd; } /** * Returns the directory in which the command was executed. */ public function getCd(): ?string { return $this->cd; } /** * Returns the environment variables that were set during the command execution. */ public function getEnv(): array { return $this->env; } }