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

Ensure ~/.recap can be sourced from anywhere #56

Merged
merged 1 commit into from May 11, 2012

Conversation

chrisroos
Copy link
Contributor

Sourcing ~/.recap from outside the home directory fails to generate the
.recap-env-export file correctly because it expects to find .env in the
current directory.

This fix ensures we read ~/.env and generate ~/.recap-env-export
correctly.

I came across this problem when using the whenever gem to generate my
crontab. It generate a command similar to /bin/bash -l -c 'my-command'
which I tried to run from the command line. Running it in a directory
outside of ~ fails due to the problem mentioned above. NOTE The key
part of that command is '-l' which tells bash to load ~/.profile (among
other things).

Sourcing ~/.recap from outside the home directory fails to generate the
.recap-env-export file correctly because it expects to find .env in the
current directory.

This fix ensures we read ~.env and generate ~/.recap-env-export
correctly.

I came across this problem when using the whenever gem to generate my
crontab.  It generate a command similar to /bin/bash -l -c 'my-command'
which I tried to run from the command line.  Running it in a directory
outside of ~ fails due to the problem mentioned above.  *NOTE* The key
part of that command is '-l' which tells bash to load ~/.profile (among
other things).
tomafro added a commit that referenced this pull request May 11, 2012
…ecap-env-export

Ensure ~/.recap can be sourced from anywhere
@tomafro tomafro merged commit c4baebd into master May 11, 2012
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.

None yet

2 participants