Skip to content

fix(install): stop advising a -d flag that does not exist - #1222

Merged
Chemaclass merged 1 commit into
mainfrom
fix/1221-install-advice-flag
Aug 14, 2026
Merged

fix(install): stop advising a -d flag that does not exist#1222
Chemaclass merged 1 commit into
mainfrom
fix/1221-install-advice-flag

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #1221

All three destination errors in install.sh ended with Choose another destination with -d. The script parses positional arguments only, so following that advice returns Invalid arguments — the one message whose job is to tell the reader how to recover pointed at a form the parser rejects.

💡 Changes

  • Name the real interface in the not-a-directory, cannot-create and not-writable messages
  • Test by running the suggested form rather than string-matching it; the previous tests asserted the diagnosis line only, which is how an invented flag survived
  • Assert the advice on the run that actually prints it — a flag-shaped argument dies in the parser before any advice, so checking it there compares against an empty string and passes for free

All three destination errors ended with "Choose another destination with -d".
install.sh parses positional arguments only, so the one message whose job is to
tell the reader how to recover pointed at a form the parser rejects with
"Invalid arguments".

The existing tests asserted the diagnosis line and stopped there, so the
invented flag was never executed. The new test runs the suggested form instead
of string-matching it, and checks the advice on the run that actually prints it
-- a flag-shaped argument dies in the parser first, so asserting there compares
against nothing and passes for free. That vacuous version was written, caught by
mutating the message back, and replaced.

Closes #1221
@Chemaclass Chemaclass added the bug Something isn't working label Aug 14, 2026
@Chemaclass Chemaclass self-assigned this Aug 14, 2026
@Chemaclass
Chemaclass merged commit 5e06837 into main Aug 14, 2026
40 checks passed
@Chemaclass
Chemaclass deleted the fix/1221-install-advice-flag branch August 14, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant