Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions lib/Migration/InstallDeps.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected function installNodeBinary(IOutput $output) : void {
$isARM = true;
}
} else {
$output->warning('CPU architecture $uname is not supported.');
$output->warning("CPU architecture $uname is not supported.");
return;
}

Expand All @@ -171,9 +171,13 @@ protected function testBinary(string $binaryPath): ?string {
if (!file_exists($binaryPath)) {
return null;
}
$returnCode = 1;
try {
// Make binary executable
chmod($binaryPath, 0755);
// Make our own downloaded binary executable; a binary set by the admin (e.g. /usr/bin/node)
// usually belongs to root and is already executable, so chmod() on it would only fail with a warning
if (!is_executable($binaryPath)) {
@chmod($binaryPath, 0755);
}

$cmd = escapeshellcmd($binaryPath) . ' ' . escapeshellarg('--version');

Expand Down