我想在控制器中使用它
$process = new Process('cd ../ && mkdocs build');
$process->run();
// executes after the command finishes
if (!$process->isSuccessful()) {
throw new ProcessFailedException($process);
}
错误抛出此
sh: 1: mkdocs: not found
如果我使用exec
exec("cd ../ && mkdocs build", $out, $result);
它可以成功