-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[cli] Change vc env pull
default output file to .env.local
#9892
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does vc dev
need to be updated to read .env.local
?
Looks like we decided that vc dev
should be changed to stop reading .env
entirely.
pull
write to .env.local
vc env pull
default to .env.local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to update --help
as well as vercel.com/docs
@styfle does |
@dan-stowell Yes this is semver-major because its a breaking change (needs the label too) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works as advertised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update these references to .env
as well?
- errors/missing-env-file.md - should refer to
.env.local
? - examples/sanity/.env.template - should be
.env.local.template
? - packages/cli/src/util/dev/server.ts - line 674 and 675 should use
.env.local
and maybe fall back to.env
? - packages/cli/src/util/dev/types.ts - comments in
EnvConfigs
should refer to.env.local
I'm not positive how best to update dev/server.ts
, but I think we should take a stab at them in this PR.
…d" test" This reverts commit 3c43a9e.
Done & pushed.
Done & pushed.
Based on discussion in Linear, it seems that we do not want |
Let's make vc dev
changes separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
vc env pull
default to .env.local
vc env pull
default output file to .env.local
c33be8c
🦋 Changeset detectedLatest commit: c33be8c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This is a follow up to PR #9892 which changed the default to `.env.local`. Now that we know local files should never be committed to git, we can automatically add `.env*.local` to `.gitignore`. Note that this is the same ignore pattern that ships with create-next-app [as seen here](https://github.com/vercel/next.js/blob/06abd634899095b6cc28e6e8315b1e8b9c8df939/packages/create-next-app/templates/app/js/gitignore#L28), so most Next.js users won't see anything change. See the related [Linear ticket](https://linear.app/vercel/issue/VCCLI-461/)
vc deploy
ignores.env.local
. To make sure we don't inadvertently push people's secrets to source control, have all environment pulls default to writing to.env.local
.Linear ticket