feat(npm/oxlint): display target triple when error is thrown (#2259)

To improve debuggability

closes #2196
This commit is contained in:
Boshen 2024-02-02 11:22:34 +08:00 committed by GitHub
parent a3df55e7ed
commit 0ae28dd159
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -131,9 +131,13 @@ if (binPath) {
process.exitCode = result.status;
} else {
let target = `${platform}-${arch}`;
if (isMusl()) {
target = `${target}-musl`;
}
console.error(
"The oxlint CLI package doesn't ship with prebuilt binaries for your platform yet. " +
"You can create an issue at https://github.com/oxc-project/oxc/issues for support.",
`The oxlint CLI package doesn't ship with prebuilt binaries for your platform (${target}) yet. ` +
"You can create an issue at https://github.com/oxc-project/oxc/issues for support.",
);
process.exitCode = 1;
}