We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5379dfc commit 5174d49Copy full SHA for 5174d49
1 file changed
scripts/setup-cloudflare.js
@@ -221,7 +221,10 @@ function getEnvVars() {
221
if (line.trim() && !line.startsWith('#')) {
222
const [key, ...values] = line.split('=');
223
if (key && values.length > 0) {
224
- env[key.trim()] = values.join('=').trim().replace(/^"|"$/g, '');
+ // Strip surrounding quotes, then unescape literal \n sequences
225
+ // (wrangler secrets must receive real newlines, not the two chars \ and n)
226
+ const raw = values.join('=').trim().replace(/^"|"$/g, '');
227
+ env[key.trim()] = raw.replace(/\\n/g, '\n');
228
}
229
230
0 commit comments