I was trying to git pull by calling a spesific route.
I'm using symfony/process inside my controller like so:
public function pull()
{
$process = new Process(["git","pull"]);
$process->setWorkingDirectory(base_path());
$process->run(function ($type, $buffer) {
if (Process::ERR === $type) {
echo 'ERR > '.$buffer;
} else {
echo 'OUT > '.$buffer;
}
});
}
when I hit the route it returns:
ERR > 'git' is not recognized as an internal or external command, operable program or batch file.
then I tried to change the command to any other command like ls, npm install, rm, etc... and it is still returning the same error.