From 91a1898d444598b32e0fcfa88daff4f2372f040b Mon Sep 17 00:00:00 2001 From: childish-sambino Date: Fri, 26 Jun 2020 08:53:54 -0500 Subject: [PATCH] feat: update the env var message to use the proper OS syntax (#93) Windows uses the 'set' command while *nix requires the 'export' command. --- src/services/messaging/help-messages.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/services/messaging/help-messages.js b/src/services/messaging/help-messages.js index b7350508..1fc736b3 100644 --- a/src/services/messaging/help-messages.js +++ b/src/services/messaging/help-messages.js @@ -1,15 +1,17 @@ const { CLI_NAME } = require('../config'); +const ENV_VAR_CMD = process.platform === 'win32' ? 'set' : 'export'; + exports.HELP_ENVIRONMENT_VARIABLES = `Alternatively, ${CLI_NAME} can use credentials stored in environment variables: # OPTION 1 (recommended) -TWILIO_ACCOUNT_SID = your Account SID from twil.io/console -TWILIO_API_KEY = an API Key created at twil.io/get-api-key -TWILIO_API_SECRET = the secret for the API Key +${ENV_VAR_CMD} TWILIO_ACCOUNT_SID=your Account SID from twil.io/console +${ENV_VAR_CMD} TWILIO_API_KEY=an API Key created at twil.io/get-api-key +${ENV_VAR_CMD} TWILIO_API_SECRET=the secret for the API Key # OPTION 2 -TWILIO_ACCOUNT_SID = your Account SID from twil.io/console -TWILIO_AUTH_TOKEN = your Auth Token from twil.io/console +${ENV_VAR_CMD} TWILIO_ACCOUNT_SID=your Account SID from twil.io/console +${ENV_VAR_CMD} TWILIO_AUTH_TOKEN=your Auth Token from twil.io/console Once these environment variables are set, a ${CLI_NAME} profile is not required to move forward with installation.`;