Merge pull request #12 from heroku/cwall/not-require-salsforce-url
Skip writing user config from SALESFORCE_URL
This commit is contained in:
Коммит
c3360cdf84
15
lib/force.js
15
lib/force.js
|
@ -20,7 +20,9 @@ const HEROKU_APP_NAME = _.getEnvVarValue('HEROKU_APP_NAME', false, 'Salesforce B
|
|||
const IS_SALESFORCE_WORKSPACE = _.getEnvVarValue('SALESFORCE_WORKSPACE', false, true, true); // set by bin/compile
|
||||
const SALESFORCE_SRC_PATH = _.getEnvVarValue('SALESFORCE_SRC_PATH', false, 'salesforce/src');
|
||||
const SALESFORCE_URL_CONFIG_VAR_NAME = 'SALESFORCE_URL';
|
||||
// custom URL provided by Salesforce Add-on that enables connectivity to org
|
||||
// custom URL provided by Salesforce Add-on that enables connectivity to org.
|
||||
// if false, app is telling us that a Salesforce Add-on created org is not
|
||||
// need, eg Test Runner is controlling what/how orgs are spun-up
|
||||
const SALESFORCE_URL = _.getEnvVarValue(SALESFORCE_URL_CONFIG_VAR_NAME, true);
|
||||
const SALESFORCE_HUB_URL_CONFIG_VAR_NAME = 'SALESFORCE_HUB_URL';
|
||||
const SALESFORCE_DEPLOY_DIR = _.getEnvVarValue('SALESFORCE_DEPLOY_DIR', false, '.salesforce'); // set by bin/compile
|
||||
|
@ -137,12 +139,21 @@ const parseOrgConfigFromUrl = function parseOrgConfigFromUrl(url, type, username
|
|||
};
|
||||
};
|
||||
|
||||
// Write workspace org config from SALESFORCE_URL to .appcloud to be consumed by appcloud module
|
||||
// Write workspace org config from SALESFORCE_URL to .appcloud to be consumed by appcloud module.
|
||||
// If 'false', app is telling us that SALESFORCE_URL is not required.
|
||||
const writeOrgConfig = function writeOrgConfig() {
|
||||
if (DEBUG) {
|
||||
_.info(`[DEBUG] ${SALESFORCE_URL_CONFIG_VAR_NAME}: ${SALESFORCE_URL}`);
|
||||
}
|
||||
|
||||
if (SALESFORCE_URL === 'false') {
|
||||
if (VERBOSE) {
|
||||
_.info(`Skip writing user org config: ${SALESFORCE_URL_CONFIG_VAR_NAME} was not required.`);
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
orgConfig = parseOrgConfigFromUrl(SALESFORCE_URL, 'workspace');
|
||||
|
||||
if (DEBUG) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче