From cedf4a40bf2670c8bc6ad08fd2293e7ea86d0872 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Tue, 30 Aug 2016 00:10:20 -0700 Subject: [PATCH] support for escaping --- bin/now-deploy | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/now-deploy b/bin/now-deploy index 398954e..b11dc4d 100755 --- a/bin/now-deploy +++ b/bin/now-deploy @@ -274,7 +274,8 @@ async function sync (token) { return process.exit(1); } else { console.log(`> Reading ${chalk.bold(`"${chalk.bold(key)}"`)} from your env (as no value was specified)`); - val = process.env[key]; + // escape value if it begins with @ + val = process.env[key].replace(/^\@/, '\\@'); } } else { val = val_; @@ -298,7 +299,11 @@ async function sync (token) { } } - return [key, val]; + return [ + key, + // add support for escaping the @ as \@ + val.replace(/^\\@/, '@') + ]; })); let env = {};