Skip to content

Commit

Permalink
Make 'nice' check cross-platform
Browse files Browse the repository at this point in the history
`nice(1)` has no `--version` option in non-GNU installations (FreeBSD, in this case). Rather do a `nice true` to test its function.

Signed-off-by: Eirik Øverby <[email protected]>
  • Loading branch information
ltning authored Feb 14, 2024
1 parent 4a18d64 commit 886daaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function nice(): JSONResponse {
}

try {
exec($nice_path . ' --version' . ' 2>&1', $output, $returnCode);
exec($nice_path . ' true' . ' 2>&1', $output, $returnCode);
} catch (\Throwable $e) {
return new JSONResponse(['nice' => false]);
}
Expand Down

0 comments on commit 886daaa

Please sign in to comment.