Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: search both origin and canonicalized directory of current_exe #94

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

wangl-cc
Copy link
Member

In recent changes, we force current_exe to be canonicalized. However, for homebrew, maa is installed in separate directory, and linked to /usr/local/bin/maa or /opt/homebrew/bin/maa. To search library and resource also installed by homebrew, we need to search the origin directory of current_exe. So we search both origin and canonicalized directory of current_exe.

In recent changes, we force `current_exe` to be canonicalized.
However, for homebrew, `maa` is installed in separate directory,
and linked to `/usr/local/bin/maa` or `/opt/homebrew/bin/maa`.
To search library and resource also installed by homebrew,
we need to search the origin directory of `current_exe`.
So we search both origin and canonicalized directory of `current_exe`.
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (86d3807) 22.77% compared to head (6e156f9) 22.68%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
- Coverage   22.77%   22.68%   -0.10%     
==========================================
  Files          20       20              
  Lines        1484     1490       +6     
==========================================
  Hits          338      338              
- Misses       1146     1152       +6     
Files Coverage Δ
maa-cli/src/installer/maa_cli.rs 0.00% <0.00%> (ø)
maa-cli/src/installer/maa_core.rs 3.84% <0.00%> (-0.16%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wangl-cc wangl-cc merged commit fee2195 into main Oct 30, 2023
8 of 10 checks passed
@wangl-cc wangl-cc deleted the current_exe branch October 30, 2023 08:06
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