You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep getting this error on Amazon Linux VM: direnv: error invalid character 'A' looking for beginning of value
Steps to Reproduce
After login create a new .envrc file in any Git repository:
echo export FOO=foo > .envrc
direnv: error /home/ec2-user/repos/poc-tools/.envrc is blocked. Run `direnv allow` to approve its content
[ec2-user@ip-10-222-17-45 poc-tools]$ direnv allow .
direnv: loading ~/repos/poc-tools/.envrc
direnv: error invalid character 'A' looking for beginning of value
[ec2-user@ip-10-222-17-45 poc-tools]$ cat -A .envrc
export FOO=foo$
Expected Behaviour
direnv should load the variable into current session
Actual Behaviour
Each time when trying to run direnv allow or direnv reload I keep getting this error:
direnv: error invalid character 'A' looking for beginning of value
bash --version | head -2
GNU bash, version 5.2.15(1)-release (x86_64-amazon-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
Direnv version [2.25.2, 2.34.0] - installed via asdf
Additional context
The problem exists when using direnv installed with asdf. It exists regardless of version installed (two versions were tested).
The following line was added to a file ~/.bashrc: eval "$(direnv hook bash)
asdf version
asdf --version
v0.14.0-ccdd47d
The error shows up on each repository where .envrc is created and then trying to be loaded.
[ec2-user@ip-10-222-17-45 k8s]$ cd ../poc-tools/
direnv: loading ~/repos/poc-tools/.envrc
direnv: error invalid character 'A' looking for beginning of value
Hook loaded
type _direnv_hook
_direnv_hook is a function
_direnv_hook ()
{
local previous_exit_status=$?;
trap -- '' SIGINT;
eval "$("/home/ec2-user/.asdf/installs/direnv/2.34.0/bin/direnv" export bash)";
trap - SIGINT;
return $previous_exit_status
}
Describe the Bug
Keep getting this error on Amazon Linux VM:
direnv: error invalid character 'A' looking for beginning of value
Steps to Reproduce
After login create a new
.envrc
file in any Git repository:Expected Behaviour
direnv should load the variable into current session
Actual Behaviour
Each time when trying to run
direnv allow
ordirenv reload
I keep getting this error:direnv: error invalid character 'A' looking for beginning of value
Debug Output
asdf
Additional context
The problem exists when using
direnv
installed withasdf
. It exists regardless of version installed (two versions were tested).The following line was added to a file
~/.bashrc
:eval "$(direnv hook bash)
The error shows up on each repository where
.envrc
is created and then trying to be loaded.Trying to reshim did not help:
The text was updated successfully, but these errors were encountered: