fix: don't throw when machine-id is missing

This commit is contained in:
Alexis Tyler
2021-05-14 09:59:28 +09:30
parent 11d220e649
commit 97042a8bed
+1 -1
View File
@@ -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;