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
I'm currently not sure if I'm using Approve-DotenvDir and Approve-DotenvFile correctly as it seems that the approvals are not persisted between terminal sessions.
I suppose this should work
Open a new PowerShell terminal
Create a new .env file e.g. echo FOO=BAR > c:\myexampledirectory.env
Approve the folder/file e.g. Approve-DotenvDir c:\myexampledirectory
Close the terminal
Open a new terminal
CD to the directory with the approved .env file e.g. cd c:\mygitdirectory
Environment variable FOO should be loaded from the .env file
So step 7 doesn't work. I get an error message "file is not authorized, authorize it with Approve-DotenvFile or disable the safe mode". To get past this error, I would need to approve the file again.
To circumvent this I added my example directory to be approved in my $profile.
Am I overthinking this and something is just breaking the persistence of the approval? Or does the approval need to be run explicitly every time? I think direnv only requires reapproval if you make any changes to the file.
The text was updated successfully, but these errors were encountered:
I'm currently not sure if I'm using Approve-DotenvDir and Approve-DotenvFile correctly as it seems that the approvals are not persisted between terminal sessions.
I suppose this should work
So step 7 doesn't work. I get an error message "file is not authorized, authorize it with
Approve-DotenvFile
or disable the safe mode". To get past this error, I would need to approve the file again.To circumvent this I added my example directory to be approved in my $profile.
My $profile regarding dotenv
Am I overthinking this and something is just breaking the persistence of the approval? Or does the approval need to be run explicitly every time? I think direnv only requires reapproval if you make any changes to the file.
The text was updated successfully, but these errors were encountered: