-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(2694): tailcall server run via npx command #2733
Changes from all commits
8e471e5
2f6e8c8
af9bc1b
7cd9f1c
b4c7665
48a0829
efbd790
3ac63ba
2ffc57d
47f2c79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
// @ts-check | ||
import {familySync, GLIBC, MUSL} from "detect-libc" | ||
import get_matched_platform from "./utils.js" | ||
|
||
const os = process.platform | ||
const arch = process.arch | ||
const libcFamily = familySync() | ||
|
||
let libc = "" | ||
if (os === "win32") { | ||
libc = "msvc" | ||
} else { | ||
libc = libcFamily === GLIBC ? "gnu" : libcFamily === MUSL ? "musl" : "" | ||
} | ||
Comment on lines
+7
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duplicate code There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes. |
||
|
||
const matched_platform = get_matched_platform(os, arch, libc) | ||
|
||
const dependency = Object.keys(optionalDependencies).find((name) => name.includes(`${os}-${arch}`)) | ||
if (!dependency) { | ||
if (matched_platform == null) { | ||
const redColor = "\x1b[31m" | ||
const resetColor = "\x1b[0m" | ||
console.error(`${redColor} Tailcall does not support platform ${os} arch ${arch} ${resetColor}`) | ||
console.error(`${redColor} Tailcall does not support platform - ${os}, arch - ${arch}, libc - ${libc} ${resetColor}`) | ||
webbdays marked this conversation as resolved.
Show resolved
Hide resolved
|
||
process.exit(1) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have we dropped the
-
hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently implementation doest need it.