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
dotenv-vault pull and dotenv-vault push modifying my gitignore file every time.
Proposal
Removing the following checks on pull and push
new AppendToDockerignoreService().run()
new AppendToGitignoreService().run()
new AppendToNpmignoreService().run()
Little explanation
I have noticed that during all the commands (pull, push, etc), it checks .gitignore (and also .npmignore, .dockerignore) for existence of the ".env", "!.env.vault", etc., and modifies the gitignore file if it doesn't adhere to the specific gitignore lines it's looking for.
It makes total sense when creating a new / linking an existing project, but not on every pull and push.
Why? / My use case
As mentioned in #228 , a use case exists where I would like to not commit the .env.vault / .env.project into the repository, so I had to manually change these gitignores automatically added by dotenv-vault.
What this means is, I manually and intentionally removed the !.env.vault and !.env.project from my gitignore.
But on every pull and push, they are added again, which is not what I want.
Please note: I am totally fine with the code automatically adding these git-ignores during new or build. I just don't want it to modify the file again during a dotenv-vault pull or push and alter my own git-ignore modifications.
P.S. Big fan of dotenv-vault!
The text was updated successfully, but these errors were encountered:
@www-chique good point. That is annoying. I don't like when software gets in the way.
I think we will adjust to your suggestion - just on new and build (with the ability to force ignore). Let me think on that.
One thing we have also kicked around is using the .env.vault itself as instructions for these commands - that the dotenv-vault cli would obey. Basically mapping default flags to flags inside of the .env.vault file.
This way each individual could create their project with their chosen settings - gitignore append always on, bypass open ui prompt always on, etc.
@motdotla - That sounds amazing!
Since you already added it to the roadmap at #238 , you can close this thread if you like. Since that will solve my problem.
motdotla
changed the title
Is it necessary to check/append gitignore on all commands?
Add settings to .env.vault to customize things like .gitignore
Nov 4, 2023
The problem
dotenv-vault pull
anddotenv-vault push
modifying my gitignore file every time.Proposal
Removing the following checks on pull and push
Little explanation
I have noticed that during all the commands (pull, push, etc), it checks .gitignore (and also .npmignore, .dockerignore) for existence of the ".env", "!.env.vault", etc., and modifies the gitignore file if it doesn't adhere to the specific gitignore lines it's looking for.
It makes total sense when creating a new / linking an existing project, but not on every pull and push.
Why? / My use case
As mentioned in #228 , a use case exists where I would like to not commit the .env.vault / .env.project into the repository, so I had to manually change these gitignores automatically added by dotenv-vault.
What this means is, I manually and intentionally removed the !.env.vault and !.env.project from my gitignore.
But on every pull and push, they are added again, which is not what I want.
Please note: I am totally fine with the code automatically adding these git-ignores during
new
orbuild
. I just don't want it to modify the file again during adotenv-vault pull
orpush
and alter my own git-ignore modifications.P.S. Big fan of dotenv-vault!
The text was updated successfully, but these errors were encountered: