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

Fix grepping for direnv, add profile files to messages #2001

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

kukimik
Copy link
Contributor

@kukimik kukimik commented Sep 3, 2024

I'm on Linux Mint (an Ubuntu derivative). I'm using the bash shell. The file ~/.bash_profile doesn't exist on my machine. My ~/.bashrc file contains the eval "$(direnv hook bash)" line.

The script displayed a grep error saying that the ~/.bash_profile file does not exist and instructed me to add the line above to ~/.bashrc, which I already did.

It looks like the fix works in my config. I didn't try it on zsh. Unfortunately I'm not sure if this is a POSIX-compliant solution.

Because if one of the files ~/.bashrc, ~/.bash_profile didn't exist, but the other file contained the string "direnv", grep returned non-zero exit status.
Copy link
Member

@mpscholten mpscholten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for slow merge 👍 and thanks! According to o1-preview it's posix compliant 👍

@mpscholten mpscholten merged commit 4374cb7 into digitallyinduced:master Nov 2, 2024
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