mustRun(); $output = $process->getOutput(); } catch (RuntimeException $e) { // Do nothing $output = null; } } else { // Remember current directory $dir = getcwd(); // Change to base directory chdir($path); $output = shell_exec($command); // Change back chdir($dir); } if (! $output) { return str(config('anonaddy.version')); } return Str::of($output)->after('v')->trim(); } }