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

Env file not loaded when specified full-path #49

Closed
bartmeuris opened this issue Jan 16, 2015 · 7 comments
Closed

Env file not loaded when specified full-path #49

bartmeuris opened this issue Jan 16, 2015 · 7 comments

Comments

@bartmeuris
Copy link

On Linux, using version 0.15.0, when you specify the full-path to the environment file to load, it fails. When specifying a relative path, it works:

ProcFile.test:

test: echo "-- $FOO --"

testenv:

FOO=123
EXE=echo

Starting with these files normally just works:

$  forego start -f ProcFile.test -e testenv
forego | starting test.1 on port 5000
test.1 | -- 123 --
$

When Specifying full-path for the env file, the environment variables are not loaded:

$  forego start -f ProcFile.test -e ${PWD}/testenv
forego | starting test.1 on port 5000
test.1 | --  --
$

This used to work correctly in 0.13.1

@ddollar
Copy link
Owner

ddollar commented Jan 30, 2015

Does ${PWD} contain a space?

@bartmeuris
Copy link
Author

No it does not - the example above was in tested in /home/vagrant

@tehbilly
Copy link

Question, what platform are you trying this on? I wasn't able to duplicate this on my Arch box or my Windows machine.

That's not entirely true, I was able to replicate it on Windows inside of cygwin, but nowhere else.

@bartmeuris
Copy link
Author

I tested this in Ubuntu 14.04 in Vagrant (and in an Ubuntu 14.04 Docker container where I first encountered the problem, and was able to replicate it in a VM). Note that I also tried typing out the complete path (so it's not the ${PWD} substitution)

@jmervine
Copy link
Contributor

Mind including the output for the following commands:

  1. echo $PWD
  2. pwd
  3. echo "forego start -f ProcFile.test -e ${PWD}/testenv" << redundant, but still

Also try: forego start -f ProcFile.test -e /home/vagrant/testenv (per your comments above).

@paulmelnikow
Copy link

I can reproduce this on Mac OS X Yosemite 10.10.5.

Works (i.e. spits out the ADMIN keys I expect):

forego run -e .env env | grep ADMIN
forego run -e ./.env env | grep ADMIN

Doesn't work:

forego run -e ~/.code/core/.env env | grep ADMIN
forego run -e /Users/pnm/code/core/.env env | grep ADMIN
$ echo "$PWD"
/Users/pnm/code/core
$ pwd
/Users/pnm/code/core
$ forego run -e ${PWD}/.env env | grep ADMIN
$ forego run -e /Users/pnm/code/core/.env env | grep ADMIN

@paulmelnikow
Copy link

Ah, this works for me in 4eaf541, can you push a release?

@ddollar ddollar closed this as completed Apr 23, 2016
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

No branches or pull requests

5 participants