Vercel CLI now preserves local environment variables when linking
Key point
Vercel CLI has been updated so that running vercel link no longer overwrites existing variables in the .env.local file, preserving them instead.
Details
Now, when running the vercel link command in Vercel CLI, the existing contents of the .env.local file can be preserved. Previously, there was an issue where variables in the file would get overwritten during the linking process.
The updated CLI works by leaving other settings in the existing file untouched, while updating VERCEL_OIDC_TOKEN if it already exists, or adding it if it doesn't.
To use the latest feature, you can update with the following command.
pnpm i -g vercel@latest- Then run
vercel link
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.