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

Find bin paths at runtime #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DogLooksGood
Copy link

In NixOS and Guix, the executables do not exist globally. So it's better to find executables at runtime instead of defining them at startup.

@nemethf
Copy link
Contributor

nemethf commented Mar 7, 2024

If the binaries are not in the PATH, executable-find won't be able to find them, and with this pull request, the user won't be able to specify their locations.

@kwrooijen
Copy link
Owner

This PR seems to break backwards compatibility, as well as customization, as @nemethf stated. It sounds to me like the best option would be for the small group of NixOS / Guix users to specify the path by changing cargo-process--custom-path-to-bin in their config.

@DogLooksGood
Copy link
Author

It makes sense!

I just updated the PR. Now these two variables support nil, which let it find paths at runtime. How do you guys think?

@nemethf
Copy link
Contributor

nemethf commented Mar 8, 2024

Running these cargo-process--find-*-path defuns at every shell-command seems unnecessarily wasteful to me.

@DogLooksGood
Copy link
Author

With the latest update, the default behavior is unchanged. The runtime detection is only enabled when these variables are set to nil manually.

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.

3 participants