`auto init` fails to add .env to .gitignore
- Dominant language
- TypeScript
- Stars
- 2.5k
- Forks
- 221
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Running `auto init` doesn't add `.env` to `.gitignore` file but to itself.
**To Reproduce**
- Create a new package (`npm init`)
- run `auto init`
- When asked `Would you like to create an .env file? This makes it easy to test and use auto locally.` answers `true` (default behavior).
This will add your tokens to `.env` but also the `.env` to itself rather than to the `gitignore` file.
**Expected behavior**
I expect the `.env` to be added to my `.gitgnore` file and not to my `.env`.
**~Screenshots~ Files**
Here's my `.env` after the `init` command finishes:
```
NPM_TOKEN=not-actual-npm-token
GH_TOKEN=not-actual-github-token
.env
```
**Environment information:**
```txt
"auto" version: v10.37.6
"git" version: v2.37.2
"node" version: v18.6.0
```
**Additional context**
Not context but just signalling that I'm working on the fix as well and not just submitting.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.