mirror of
https://github.com/unraid/api.git
synced 2026-05-06 23:20:30 -05:00
fix: don't fail on empty socket file
This commit is contained in:
+3
-3
@@ -119,9 +119,9 @@ if (isNaN(parseInt(port, 10))) {
|
||||
// Check if the process that made this file is still alive
|
||||
const pid = await execa.command(`lsof -t ${port}`)
|
||||
.then(output => {
|
||||
const pids = cleanStdout(output).split('\n');
|
||||
return pids[0];
|
||||
});
|
||||
const pids = cleanStdout(output).split('\n');
|
||||
return pids[0];
|
||||
}).catch(() => undefined);
|
||||
|
||||
// Try to kill it?
|
||||
if (pid) {
|
||||
|
||||
Reference in New Issue
Block a user