Skip to content
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

vercel env pull cannot properly handle value that contains " #11258

Open
cm-ayf opened this issue Mar 12, 2024 · 0 comments
Open

vercel env pull cannot properly handle value that contains " #11258

cm-ayf opened this issue Mar 12, 2024 · 0 comments

Comments

@cm-ayf
Copy link

cm-ayf commented Mar 12, 2024

vercel env pull cannot properly handle value that contains ". The problematic code is here:

const contents =
CONTENTS_PREFIX +
Object.keys(records)
.sort()
.filter(key => !VARIABLES_TO_IGNORE.includes(key))
.map(key => `${key}="${escapeValue(records[key])}"`)
.join('\n') +
'\n';

I have some variable that contains serialized JSON string (that contains double-quoted strings) and I expect vercel env pull to use ' instead of ".

However, reading the implementation of dotenv, I have found that if both \n and " exists in the value, there is no method to escape them.

@cm-ayf cm-ayf changed the title vercel env pull cannot properly escape value that contains " vercel env pull cannot properly handle value that contains " Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant