Interpolates config values with the values of the environment variables of the process.

@private
@param {any} value - The value specified for a parameter; possibly an environment variable.
503659
function (value) {
    const IllegalValue = this.$err.IllegalValue;
    if (typeof value !== 'string') {
      return value;
    }
    const result = value.replace(ENVVAR_PATTERN, function () {
      const varname = arguments[1];
      if (process.env[varname] === undefined) {
        throw new IllegalValue(`Environment variable ${varname} was referenced but not set`);
      }
      return process.env[varname];
    });

    return result;
  }
1135204
function interpolate(val, scope) {

        // if no scope or value with {{ then no interpolation and can just return translated
        if (!scope || !val || !val.match) { return val; }

        // first, we need to get all values with a {{ }} in the string
        var i18nVars = val.match(i18nVarExpr);

        // loop through {{ }} values
        _.each(i18nVars, function (i18nVar) {
            var field = i18nVar.substring(2, i18nVar.length - 2).trim();
            var scopeVal = getScopeValue(scope, field);
            val = val.replace(i18nVar, scopeVal);
        });

        return val;
    }
675849
function(value)
	{
		value = value + '';
		var len = YamlEscaper.escapees.length;
		var maxlen = YamlEscaper.escaped.length;
		var esc = YamlEscaper.escaped;
		for (var i = 0; i < len; ++i)
			if ( i >= maxlen ) esc.push('');

		var ret = '';		
		ret = value.replace(new RegExp(YamlEscaper.escapees.join('|'),'g'), function(str){
			for(var i = 0; i < len; ++i){
				if( str == YamlEscaper.escapees[i] )
					return esc[i];
			}
		});
		return '"' + ret + '"'; 
	}
573305
function interpolate(str, args) {
        return str.replace(/\$(\d{1,2})/g, function (match, index) {
            return args[index] || '';
        });
    }
279070
public Launcher addEnvironmentVariable(final String key, final String value) {
        env.put(key, value);
        return this;
    }
41766
public String resolveString(String value, boolean ignoreWarnings) throws ConfigEvaluatorException {
        value = variableEvaluator.resolveVariables(value, this, ignoreWarnings);
        return value;
    }
475757
void configure(String key, @Nullable String value) {
    switch (key) {
      case "initialCapacity":
        initialCapacity(key, value);
        return;
      case "maximumSize":
        maximumSize(key, value);
        return;
      case "maximumWeight":
        maximumWeight(key, value);
        return;
      case "weakKeys":
        weakKeys(value);
        return;
      case "weakValues":
        valueStrength(key, value, Strength.WEAK);
        return;
      case "softValues":
        valueStrength(key, value, Strength.SOFT);
        return;
      case "expireAfterAccess":
        expireAfterAccess(key, value);
        return;
      case "expireAfterWrite":
        expireAfterWrite(key, value);
        return;
      case "refreshAfterWrite":
        refreshAfterWrite(key, value);
        return;
      case "recordStats":
        recordStats(value);
        return;
      default:
        throw new IllegalArgumentException("Unknown key " + key);
    }
  }
168603
function (key, value) {
        'use strict';
        var obj;
        if (!isStr(key)) {
            throw new Error(confKeyStrMsg, 'config-manager');
        }
        if (key.indexOf('.') === -1) {
            conf[key] = value;
        } else {
            obj = getLastNodeKey(key, conf);
            obj.node[obj.key] = value;
        }
        return this;
    }
1187963
function interpolate(string, object) {
    forOwn(object, function(value, key) {
      // escape regexp special characters in `key`
      string = string.replace(RegExp('#\\{' + key.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1') + '\\}', 'g'), value);
    });
    return string;
  }
223701
function applyEnv(env, secrets = {}, required = {}) {
  if (Array.isArray(env)) {
    env.forEach(key => {
      // if the key already exists don't overwrite it
      if (!process.env[key]) {
        const value = getValue(key, {}, secrets, required)
        process.env[key] = value
      }
    })
  } else {
    Object.entries(env).forEach(([key, value]) => {
      // if the key already exists don't overwrite it
      if (!process.env[key]) {
        const value = getValue(key, env, secrets, required)
        process.env[key] = value
      }
    })
  }
}
169489
function envVars(config, backRef)
{
  backRef = backRef || [];

  Object.keys(config).forEach(function(key)
  {
    var value;

    if (typeof config[key] == 'string')
    {
      // try simple match first, for non-empty value
      value = getVar.call(this, config[key], process.env);

      // if not, try parsing for variables
      if (!hasValue(value))
      {
        value = parseTokens.call(this, config[key], process.env);
      }

      // keep the entry if something's been resolved
      // empty or unchanged value signal otherwise
      if (hasValue(value))
      {
        config[key] = value;
      }
      else
      {
        delete config[key];
      }
    }
    else if (isObject(config[key]))
    {
      envVars.call(this, config[key], backRef.concat(key));
    }
    // Unsupported entry type
    else
    {
      throw new Error('Illegal key type for custom-environment-variables at ' + backRef.concat(key).join('.') + ': ' + Object.prototype.toString.call(config[key]));
    }
  }.bind(this));

  return config;
}
1225290
function parseEntities(value, options) {
  var settings = {}
  var option
  var key

  if (!options) {
    options = {}
  }

  for (key in defaults) {
    option = options[key]
    settings[key] =
      option === null || option === undefined ? defaults[key] : option
  }

  if (settings.position.indent || settings.position.start) {
    settings.indent = settings.position.indent || []
    settings.position = settings.position.start
  }

  return parse(value, settings)
}
965735
function InterpolatedString(nodes,o){
	if(o === undefined) o = {};
	this._nodes = nodes;
	this._options = o;
	this;
}
247755
function strFromEnvironmentVarSetting(functionsVar, envVar) {
  if (!process.env[envVar]) {
    const msg = `${envVar} does not exist on within environment variables`
    warn(msg)
    return ''
  }
  return `${functionsVar}="${process.env[envVar]}"`
}
559879
private void processKeyValue(Map<ConfigurationKey, Object> properties, String stringKey, Object value) {
        processKeyValue(properties, stringKey, value, false);
    }
703165
def config(key, value, local=True):
    
    option = local and '--local' or ''
    run('config %s "%s" "%s"' % (option, key, value))
68068
@Given("^I save \'(.+?)\' in variable \'(.+?)\'$")
    public void saveInEnvironment(String value, String envVar) {
        ThreadProperty.set(envVar, value);
    }