Repository navigation
Commit cb40632
docs: document npm installs; installer: accept brew, reject unknown methods (#221)
* feat(installer): fall back to npm when no other package manager is available
When INSTALL_METHOD is unset, use npm instead of the raw method on macOS
without Homebrew, and on Linux without apt, yum or apk (outside CI and
without a pinned VERSION). npm is used only if it is on PATH, its global
prefix is writable without sudo, and Node.js is not managed by a version
manager (nvm, fnm, Volta, asdf, mise), whose global packages disappear when
the Node.js version changes. INSTALL_DIR keeps the raw method.
INSTALL_METHOD=npm forces npm, and installs upsun@VERSION if VERSION is set.
Also:
- accept "brew" as an alias for "homebrew", as documented in the README
- reject unknown install methods, which previously installed nothing
- make call_user return the command's exit status, not that of indent
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: document npm installs and the installer's npm fallback
- README: npm install and upgrade sections, all INSTALL_METHOD values,
and how the installer chooses a method by default.
- Release notes: the npm upgrade command.
- Installer tests: npm fallback jobs on Linux (Arch, with Node.js and no
apt, yum or apk) and on macOS (with Homebrew hidden from PATH), and an
Arch case in scripts/test/installer.sh.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(installer): require Node.js 18 for the npm fallback
The npm package's wrapper needs Node.js 18 or later, and npm only warns
about an unsupported engine, so the installer falls back to the raw method
with older Node.js versions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(installer): keep raw installs, and install optional npm dependencies
Rerunning the installer keeps the raw method if the CLI is already
installed other than by npm: npm cannot replace that binary, and two copies
would be left. npm installs the platform binary as an optional dependency,
so --include=optional overrides user config that omits them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(installer): address review of the npm fallback
- call_user streams output again, and still returns the command's status.
- The Node.js version check fails closed on non-numeric output.
- After an npm install, check that the CLI runs, as npm skips the platform
binary (an optional dependency) on unsupported platforms.
- Match the bin directory against PATH entries exactly, so paths with
spaces or regex characters work.
- README: list the conditions for the npm fallback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(installer): match PATH entries with a trailing slash
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(installer): keep raw with a pinned VERSION on macOS, and upgrade npm to latest
The upsun npm package only has releases from 5.10.2, so a pinned VERSION
on macOS without Homebrew uses the raw method, as on Linux.
npm update -g keeps a global package within its major version, so the
README and release notes use npm install -g upsun@latest, as the CLI's
update notice does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(installer): drop the automatic npm fallback
The fallback reached few users: the global prefix of a system Node.js is
owned by root, so it only applied with a user-configured prefix or as
root, and most Node.js developers use a version manager, which it
excluded. npm is now used only with INSTALL_METHOD=npm.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(installer): drop the npm install method
Users who want npm can run npm install -g upsun directly. The README and
release notes keep the npm install and upgrade commands.
The installer keeps the brew alias and rejects unknown install methods,
which previously installed nothing and reported success.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent bf89bec commit cb40632
3 files changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
119 | 129 | | |
120 | 130 | | |
121 | 131 | | |
| |||
168 | 178 | | |
169 | 179 | | |
170 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
171 | 187 | | |
172 | 188 | | |
173 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
358 | 362 | | |
359 | 363 | | |
360 | 364 | | |
| |||
387 | 391 | | |
388 | 392 | | |
389 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
390 | 402 | | |
391 | 403 | | |
392 | 404 | | |
| |||
0 commit comments