Skip to content

fix(install): correct the root opt-in one-liner, align --update narration - #215

Merged
polius merged 3 commits into
mainfrom
fix/update-chevron-prefix
Sep 20, 2026
Merged

polius merged 3 commits into
mainfrom
fix/update-chevron-prefix

Conversation

@polius

@polius polius commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Problem

The root-refusal message told users to run:

FSEND_ALLOW_ROOT=1 curl -fsSL https://getfsend.alzina.dev | sh

A VAR=val prefix applies only to curl; the piped sh never inherits the variable, so the suggested command always refused — root-only machines (reported on a WD MyCloud NAS) could not install at all.

Fix

  • scripts/install.sh: the opt-in moves to the sh side of the pipe — curl -fsSL https://getfsend.alzina.dev | FSEND_ALLOW_ROOT=1 sh — which POSIX shells export to that pipeline member.
  • The command is now rendered bold accent orange via a new C_ORG (truecolour #ff9e64 under COLORTERM, 256-colour 209 otherwise), matching how the binary styles run-me commands (uxlog.Code, e.g. "update it with: brew upgrade fsend").
  • fsend --update's own narration ("Checking the latest release...", "Updating fsend …") now carries the installer's › marker via a new uxlog.Step glyph (> ASCII fallback on pipes, cyan like ℹ), so fsend's lines and the installer output that follows read as one continuous block.

Deliberately unchanged: fsend --update as root still requires the explicit FSEND_ALLOW_ROOT=1 fsend --update opt-in.

Verification

  • Root Alpine container, installer piped over stdin: the old placement refuses (bug reproduced); the new placement warns and installs; the installed binary runs.
  • Colour bytes inspected on a TTY: 1;38;5;209 (256-colour) and 38;2;255;158;100 (truecolour) — matching the binary's uxlog.Code.
  • sh scripts/smoke-install.sh: 8/8 scenarios pass.
  • go build ./..., go vet, go test ./cmd/fsend/ ./internal/uxlog/ clean.

Pol Alzina added 3 commits September 20, 2026 23:31
The refusal message suggested 'FSEND_ALLOW_ROOT=1 curl … | sh', but a
VAR=val prefix applies only to curl; the piped sh never inherits it, so
the documented one-liner could never install on a root-only machine
(reported on a WD MyCloud NAS). Move the assignment onto the sh side of
the pipe — 'curl … | FSEND_ALLOW_ROOT=1 sh' — which POSIX shells export
to that pipeline member (verified end-to-end in a root Alpine container:
old placement refuses, new placement installs).

Also render the command in bold accent orange (new C_ORG: truecolour
#ff9e64 when COLORTERM advertises it, 256-colour 209 otherwise), the
same treatment the fsend binary gives run-me commands via uxlog.Code.
The 'Checking…'/'Updating…' lines printed ahead of the re-run installer
used a bare two-space indent, so fsend's narration and the ›-prefixed
installer output that followed read as two different voices. Add a
uxlog.Step glyph (›, '>' ASCII fallback on pipes, cyan like ℹ) and use
it for both lines — same TTY/colour degradation as every other glyph.
C_ORG folds bold in (mirroring uxlog.Code), which left C_BLD with no
remaining use in the script.
@polius
polius merged commit 46e133c into main Sep 20, 2026
22 checks passed
@polius
polius deleted the fix/update-chevron-prefix branch September 20, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant