Skip to content

[Question] should I be able to use direnv ‘system' ? #87

Answered by michi-zuri
andrewcrook asked this question in Q&A
Discussion options

You must be logged in to vote

May I suggest you try hooking up direnv with
eval "$(direnv hook bash)" instead of
eval "$(asdf exec direnv hook bash)"
Since you are using the system-installed direnv, there is no need for asking asdf to tell you direnv's path, just use call direnv directly from your system's path.

For direnv to understand the use asdf instruction you'd still need to add the asdf hook to the direnv config:

# File: ~/.config/direnv/direnvrc
source "$(asdf direnv hook asdf)"  

I couldn't test my suggestions, since my OS (Solus) doesn't offer a direnv package. Please let us know if it didn't work. @RCristiano's suggestion may or might not be required, depending if the asdf shims are before or after your sy…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@RCristiano
Comment options

@michi-zuri
Comment options

@RCristiano
Comment options

Answer selected by jfly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #83 on January 17, 2022 03:31.