fix(cli): only name an installer that is actually there - #1653
Merged
Conversation
`update` hands off to install.sh (install.ps1 on Windows) and prints the command
to run. It built that command from cbm_detect_self_path - the BINARY's directory
- and treated "I resolved my own location" as "the installer is beside me".
Those are different questions. install.sh is placed beside the binary by
install.sh itself, but a binary that was moved, packaged by a distro, or built
from source has no installer next to it. We printed the path anyway:
bash "/home/<user>/.local/bin/install.sh"
/usr/bin/bash: /home/<user>/.local/bin/install.sh: No such file or directory
Reported on discussion #1560 (#1632) by a user who was already three releases
deep in install trouble and had just been told, by us, to run a file that does
not exist.
`update` exists to tell someone how to proceed. Ending the interaction on a
command that cannot run is the one outcome it must not produce - and the
fallback text was already there and already correct, naming install.sh as
shipping in the release archive without asserting a path.
The probe goes through cbm_path_info_utf8 so a non-ASCII install directory
resolves on Windows, and rejects a DIRECTORY of that name, because `bash <dir>`
is not a command either. A symlink still counts: it is reported rather than
followed, and the shell runs it perfectly well.
The Windows branch gets the same treatment; it had the identical assumption
about install.ps1.
Reproduce-first and revert-checked: with the probe forced to return true - the
old behaviour - the new test fails with "a directory with no installer must not
be named as one", and passes once it is restored. cli: 276 passed.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
DeusData
force-pushed
the
fix/update-names-missing-installer
branch
from
August 15, 2026 08:43
cfca0b2 to
d58962c
Compare
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.
Fixes #1632.
updatehands off toinstall.sh(install.ps1on Windows) and prints the command to run. It built that command fromcbm_detect_self_path— the binary's directory — and treated "I resolved my own location" as "the installer is beside me".Those are different questions.
install.shis placed beside the binary by install.sh itself, so a binary that was moved, packaged by a distro, or built from source has no installer next to it. We printed the path anyway:Reported on discussion #1560 by a user who was already three releases deep in install trouble — and had just been told, by us, to run a file that does not exist.
updateexists to tell someone how to proceed. Ending the interaction on a command that cannot run is the one outcome it must not produce. The fallback text was already present and already correct: it namesinstall.shas shipping in the release archive, without asserting a path.Details
cbm_path_info_utf8, so a non-ASCII install directory resolves on Windows.install.shis rejected —bash <dir>is not a command either.install.ps1.Verification — reproduce-first and revert-checked. With the probe forced to return
true(the old behaviour), the new test fails witha directory with no installer must not be named as one; restoring it goes green.cli: 276 passed.