Suggested Improvement for those running shared dotfiles systems #2784
Replies: 4 comments
-
Shouldn't the other 2 commands also be conditional on Pyenv being installed then? |
Beta Was this translation helpful? Give feedback.
-
E.g. the 2nd command blindly adds to PATH if |
Beta Was this translation helpful? Give feedback.
-
Ideally yes, but a single non-existing directory in the PATH environment variable is quickly dropped by the assessor of the PATH, so it is low-impact. Keeping in mind that PATH is used only for initial execution of binary/script. I made a version that did a conditional check for all, but this version is the least amount of change to the original, and the most syntactically compatible across all supported shells. |
Beta Was this translation helpful? Give feedback.
-
I mean, this could easily be improved upon by adding a second test on the first "command" line that checks for the existence of the pyenv script before modifying the PATH, using |
Beta Was this translation helpful? Give feedback.
-
Here the addition of the conditional check for the pyenv command a second time before calling eval will prevent report of pyenv not found on systems that do not have it installed, but allow the init to work on systems that do.
Beta Was this translation helpful? Give feedback.
All reactions