lib/sonarqube.js
/**
 * This function is called as a parameter of the replace function and replaces
 * environment variable expressions by their value
 * @param  {...any} params These params are provided by the replace function
 */
This function is called as a parameter of the replace function and replaces
environment variable expressions by their value
@param  {...any} params These params are provided by the replace function
This function is called as a parameter of the replace function and replaces environment variable expressions by their value @param { ... any } params These params are provided by the replace function
function envVarReplace(...params) {
  const matchedEnvVar = params[0];
  debug("Matched environment variable=" + matchedEnvVar);
  const envVarName = matchedEnvVar.replace("${env.", "").replace("}", "");
  const evaluatedEnvVar = eval("process.env." + envVarName);
  debug(envVarName + " environment variable value=" + evaluatedEnvVar);
  return evaluatedEnvVar;
}
function envVarReplace ( ... params ) { const matchedEnvVar = params [ 0 ] ; debug ( "Matched environment variable=" + matchedEnvVar ) ; const envVarName = matchedEnvVar . replace ( "${env." , "" ) . replace ( "}" , "" ) ; const evaluatedEnvVar = eval ( "process.env." + envVarName ) ; debug ( envVarName + " environment variable value=" + evaluatedEnvVar ) ; return evaluatedEnvVar ; }
This function is called as a parameter of the replace function and replaces
 environment variable expressions by their value
 @param  {...any} params These params are provided by the replace function
This function is called as a parameter of the replace function and replaces environment variable expressions by their value @param { ... any } params These params are provided by the replace function