Skip to content

feat: robust Wish binary detection with version parsing#87

Open
Esubaalew wants to merge 1 commit intofodydev:mainfrom
Esubaalew:feat/wish-bin-detection
Open

feat: robust Wish binary detection with version parsing#87
Esubaalew wants to merge 1 commit intofodydev:mainfrom
Esubaalew:feat/wish-bin-detection

Conversation

@Esubaalew
Copy link
Copy Markdown

Improve Wish frontend initialization by adding robust detection of the Wish binary:

  • Added wish_parse_version to extract numeric versions from Wish binary names.
  • Added wish_sort_and_dedupe_bins to sort by version descending and remove duplicate paths.
  • Added wish_fallback_candidates for reliable fallback binaries if PATH scan fails.
  • Updated init() to scan PATH and environment variables (WISH_BIN / AFRISH_WISH_BIN) before falling back.
  • Added unit tests for parsing, sorting, and fallback functions.

This ensures Afrim Wish selects the highest available Wish version, supports custom paths, and gives clear error messages when no valid binary is found.

Improve Wish frontend initialization by adding robust detection of the Wish binary:

- Added `wish_parse_version` to extract numeric versions from Wish binary names.
- Added `wish_sort_and_dedupe_bins` to sort by version descending and remove duplicate paths.
- Added `wish_fallback_candidates` for reliable fallback binaries if PATH scan fails.
- Updated `init()` to scan PATH and environment variables (WISH_BIN / AFRISH_WISH_BIN) before falling back.
- Added unit tests for parsing, sorting, and fallback functions.

This ensures Afrim Wish selects the highest available Wish version, supports custom paths, and gives clear error messages when no valid binary is found.
@pythonbrad
Copy link
Copy Markdown
Member

pythonbrad commented Oct 5, 2025

@Esubaalew

In case the system don't have a good which version, the user can use his own through a shell command like

WISH_DIR="<the desired wish version location>"
PATH=$WISH_DIR:$PATH

./afrim_wish ...

I think it's a better approach since, the installer of afrim-wish, will make sure that the correct wish is present in the system, and will set up it.

Between, the correct place for what you are trying to do is at https://github.com/fodydev/afrish

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.

2 participants