Compare commits

...
Author SHA1 Message Date
anandh8x fbfc2a07fa fix: add android platform support for Termux npm install
`npm install -g @gitlawb/zero` failed on Android/Termux with EBADPLATFORM
because `package.json` `os` array lacked `"android"`. Termux provides a
Linux userspace — the existing `linux-arm64` binary works natively.

- Add `"android"` to the `os` array in package.json.
- Map `android` platform to `linux` in postinstall.mjs resolvePlatform().

Fixes #449
2026-07-03 19:17:51 +05:30
2 changed files with 4 additions and 2 deletions

No files matched your search

+2 -1
View File
@@ -24,7 +24,8 @@
"os": [
"linux",
"darwin",
"win32"
"win32",
"android"
],
"cpu": [
"x64",
+2 -1
View File
@@ -14,7 +14,7 @@
// Env overrides (testing / mirrors / locked-down installs):
// ZERO_SKIP_DOWNLOAD=1 skip entirely, exit 0 (wrapper will guide if run)
// ZERO_INSTALL_DRY_RUN=1 print the resolved plan as JSON, no network, exit 0
// ZERO_INSTALL_PLATFORM=… override process.platform (linux|darwin|win32)
// ZERO_INSTALL_PLATFORM=… override process.platform (linux|darwin|win32|android)
// ZERO_INSTALL_ARCH=… override process.arch (x64|arm64)
// ZERO_REPO=owner/name override the GitHub repo (default Gitlawb/zero)
// ZERO_GITHUB_BASE_URL=… override the download host (default https://github.com)
@@ -65,6 +65,7 @@ function warnSkip(message) {
function resolvePlatform(p) {
switch (p) {
case 'linux':
case 'android':
return 'linux';
case 'darwin':
return 'macos';