fix(install): correct the root opt-in one-liner, align --update narration - #215
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The root-refusal message told users to run:
A
VAR=valprefix applies only tocurl; the pipedshnever 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 theshside of the pipe —curl -fsSL https://getfsend.alzina.dev | FSEND_ALLOW_ROOT=1 sh— which POSIX shells export to that pipeline member.C_ORG(truecolour#ff9e64underCOLORTERM, 256-colour209otherwise), 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 newuxlog.Stepglyph (>ASCII fallback on pipes, cyan like ℹ), so fsend's lines and the installer output that follows read as one continuous block.Deliberately unchanged:
fsend --updateas root still requires the explicitFSEND_ALLOW_ROOT=1 fsend --updateopt-in.Verification
1;38;5;209(256-colour) and38;2;255;158;100(truecolour) — matching the binary'suxlog.Code.sh scripts/smoke-install.sh: 8/8 scenarios pass.go build ./...,go vet,go test ./cmd/fsend/ ./internal/uxlog/clean.