diff --git a/.gitignore b/.gitignore index f0d6248..707437a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules npm* build .DS_Store +.nvmrc diff --git a/src/api/args.js b/src/api/args.js index c232f18..3598e24 100644 --- a/src/api/args.js +++ b/src/api/args.js @@ -15,9 +15,13 @@ export const getEnvironmentVariables = () => { const argsArray = args instanceof Array ? args : [args]; return argsArray.map((e) => { const envArray = e.split('='); + let val = envArray[1]; + if (envArray.length > 2) { + val = ['"', envArray.slice(1, envArray.length).join('='), '"'].join(''); + } return { name: envArray[0], - value: envArray.length > 2 ? ["\"", envArray.slice(1, envArray.length).join("="), "\""].join("") : envArray[1], + value: val, }; }); }; @@ -48,6 +52,7 @@ export const getRemainingVariables = (environmentVariables = getEnvironmentVaria // get remaining options that user has passsed to meteor-now export const getRemainingOptions = () => { const args = getArgs(); + console.log('args are ', args); return ( Object.entries(args) // filter out specified list of options diff --git a/src/api/now.js b/src/api/now.js index 039985b..c279df0 100644 --- a/src/api/now.js +++ b/src/api/now.js @@ -69,6 +69,6 @@ export const deploy = async () => { logger.succeed(); } } catch (e) { - logger.error('Something went wrong with now: ' + JSON.stringify(e)); + logger.error('Something went wrong with now', e); } };