Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ksyeo1010 committed Dec 5, 2024
1 parent c304633 commit 0a94954
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion binding/nodejs/test/test_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ export function getAudioFile(audioFile: string): string {
}

function getCpuPart(): string {
if (!fs.existsSync('/proc/cpuinfo')) {
return "";
}
const cpuInfo = fs.readFileSync('/proc/cpuinfo', 'ascii');
for (const infoLine of cpuInfo.split('\n')) {
if (infoLine.includes('CPU part')) {
const infoLineSplit = infoLine.split(' ');
return infoLineSplit[infoLineSplit.length - 1].toLowerCase();
}
}
throw new Error(`Unsupported CPU.`);
return "";
}

function getModelSize(language: string): number {
Expand Down

0 comments on commit 0a94954

Please sign in to comment.