From 0ae28dd159736e4389ac9052d113b1fe094f0799 Mon Sep 17 00:00:00 2001 From: Boshen Date: Fri, 2 Feb 2024 11:22:34 +0800 Subject: [PATCH] feat(npm/oxlint): display target triple when error is thrown (#2259) To improve debuggability closes #2196 --- npm/oxlint/bin/oxlint | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/npm/oxlint/bin/oxlint b/npm/oxlint/bin/oxlint index 2ecae44ee..9f7b1a6e7 100755 --- a/npm/oxlint/bin/oxlint +++ b/npm/oxlint/bin/oxlint @@ -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; }