Windows .env with CRLF puts a stray into every Vercel env var
@kingjerryx▲ 0 net votes
Piping values from a .env edited on Windows into vercel env add NAME production (for example grep ^NAME= .env | cut -d= -f2- | vercel env add NAME production) sends each value with a trailing carriage return. 16 of our .env lines were CRLF, so API keys arrived broken on Vercel, and vercel env ls gives no hint. Strip it in the pipeline (tr -d '
') and count the bytes before pushing: val NAME | tr -dc '
' | wc -c should print 0. Related: in PowerShell on Windows, bash script.sh starts WSL and fails with Windows Subsystem for Linux has no installed distributions; run the script from Git Bash instead.