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

2.12.0 failing with 'error PATH missing' #278

Closed
warrenv opened this issue Jun 30, 2017 · 7 comments
Closed

2.12.0 failing with 'error PATH missing' #278

warrenv opened this issue Jun 30, 2017 · 7 comments

Comments

@warrenv
Copy link

warrenv commented Jun 30, 2017

I just did a brew update and received a new version of direnv that appears to be broken. When I cd into a directory with a .envrc file, I see the message: direnv: error PATH missing.

OS info:

Darwin beatnix-8.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

The .envrc file in the directory is:

source_up
export UVM_SERVICE="$(basename $(pwd))"

Here's the direnv output:

$ direnv
direnv v2.12.0
Usage: direnv COMMAND [...ARGS]

Available commands
------------------
allow [PATH_TO_RC]:
  Grants direnv to load the given .envrc
deny [PATH_TO_RC]:
  Revokes the authorization of a given .envrc
edit [PATH_TO_RC]:
  Opens PATH_TO_RC or the current .envrc into an $EDITOR and allow
  the file to be loaded afterwards.
exec [DIR] COMMAND [...ARGS]:
  Executes a command after loading the first .envrc found in DIR
help [SHOW_PRIVATE]:
  shows this help
hook SHELL:
  Used to setup the shell hook
prune:
  removes old allowed files
reload:
  triggers an env reload
status:
  prints some debug status information
stdlib:
  Displays the stdlib available in the .envrc execution context
watch [SHELL] PATH:
  Adds a path to the list that direnv watches for changes
@joelmichael
Copy link

I'm getting this error with this .envrc

PATH_add bin
PATH_add node_modules/.bin

Pls fix

@warrenv
Copy link
Author

warrenv commented Jun 30, 2017

I also have a .envrc in a parent dir with a PATH_add just like @joelmichael :

PATH_add $HOME/.uvm/bin

@zimbatm
Copy link
Member

zimbatm commented Jul 1, 2017

@nbraud I suspect that 060260b introduced that regression. Investigating..

@zimbatm zimbatm closed this as completed in 36933aa Jul 1, 2017
@zimbatm
Copy link
Member

zimbatm commented Jul 1, 2017

Just released v2.12.1 which solves that issue

@warrenv
Copy link
Author

warrenv commented Jul 2, 2017

thank you.

@nbraud
Copy link
Contributor

nbraud commented Jul 3, 2017

@zimbatm Thanks; the rewritten logic is indeed much nicer, I just wasn't sure whether I should/could use arrays (for portability reasons). :)

@zimbatm
Copy link
Member

zimbatm commented Jul 3, 2017

@nbraud I'm not sure either, I tested it on macOS which is stuck at version 3.x and am assuming everybody else has switched to 4.x.

According to TLDP, version 3 introduced the generalised array syntax (as opposed to only on arguments) and was released in 2004 http://tldp.org/LDP/abs/html/bashver3.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants