mirror of
https://github.com/unraid/api.git
synced 2026-05-02 21:22:04 -05:00
fix: don't throw when machine-id is missing
This commit is contained in:
@@ -17,7 +17,7 @@ export const getMachineId = async (): Promise<string> => {
|
||||
}
|
||||
|
||||
if (!machineId) {
|
||||
machineId = await fs.promises.readFile(path, 'utf8').then(machineId => machineId.split('\n')[0].trim());
|
||||
machineId = await fs.promises.readFile(path, 'utf8').then(machineId => machineId.split('\n')[0].trim()).catch(() => '');
|
||||
}
|
||||
|
||||
return machineId;
|
||||
|
||||
Reference in New Issue
Block a user