Lookup in {@link Environment} a certain property or a list of properties.

@param env
the {@link Environment} context from which to
@param propName
the name of the property to lookup from {@link Environment}.
@return the list
436584
public static List<String> get(final Environment env, final String propName) {
		final List<String> list = new ArrayList<>();

		final String singleProp = env.getProperty(propName);
		if (singleProp != null) {
			list.add(singleProp);
			return list;
		}

		int counter = 0;
		String prop = env.getProperty(propName + "[" + counter + "]");
		while (prop != null) {
			list.add(prop);
			counter++;
			prop = env.getProperty(propName + "[" + counter + "]");
		}

		return list;
	}
795700
def env(name, value)
      ENV[name] = value

      if value
        Stairs.configuration.env_adapter.set name, value
      else
        Stairs.configuration.env_adapter.unset name
      end
    end
485887
public Object get(String propName) {
        if (propName.equals("roles")) {
            return getRoles();
        }
        if (propName.equals("entitlements")) {
            return getEntitlements();
        }
        return null;
    }
778567
function getRosEnvVar(envVarName) {
  const envVar = process.env[envVarName];

  if (!envVar) {
    throw new Error(`Unable to find required environment variable ${envVarName}`);
  }

  return envVar;
}
55622
private Properties getEnvVars()
    {
        Process p = null;
        Properties envVars = new Properties();

        try
        {
            Runtime r = Runtime.getRuntime();
            String OS = System.getProperty("os.name").toLowerCase();

            if (OS.indexOf("windows 9") > -1)
            {
                p = r.exec("command.com /c set");
            }
            else if ((OS.indexOf("nt") > -1) ||
                     (OS.indexOf("windows 2000") > -1) ||
                     (OS.indexOf("windows xp") > -1))
            {
                p = r.exec("cmd.exe /c set");
            }
            else
            {
                // our last hope, we assume Unix (thanks to H. Ware for the fix)
                p = r.exec("env");
            }
            BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
            String line;
            while((line = br.readLine()) != null)
            {
                int idx = line.indexOf('=');
                String key = line.substring(0, idx);
                String value = line.substring(idx + 1);
                envVars.setProperty(key, value);
            }
        }
        catch (Exception ExIgnore)
        {
        }
        return envVars;
    }
684700
public Environment getEnvironment()
    {
        Environment env = ((BaseApplication)this.getApplication()).getEnvironment();
        if (env == null)
            env = Environment.getEnvironment(null);   // Never
        return env;
    }
957126
private Set<String> getEnvironments(Properties props) {
        Set<String> environments = new HashSet<>();
        for (Object k : props.keySet()) {
            String environment = k.toString().split("\\.")[0];
            environments.add(environment);
        }
        return new TreeSet<>(environments);
    }
1219289
public static void init(ProcessingEnvironment env) {
		processingEnv = env;
		typeUtils = processingEnv.getTypeUtils();
		elementUtils = processingEnv.getElementUtils();
	}
1198792
public static String getPropertyEnv(String key)
	{
		String env = sanitizeEnvVarNAme(key);
		return getProperty(env);
	}
61106
@Override
    public String lookup(String key) {
        final String value = System.getenv(key);

        if (value == null && strict) {
            throw new UndefinedEnvironmentVariableException("The environment variable '" + key
                    + "' is not defined; could not substitute the expression '${"
                    + key + "}'.");
        }

        return value;
    }
1180608
public static String readEnvironment(String environmentName) throws MnoConfigurationException {
		String property = System.getenv(environmentName);
		if (isNullOrEmpty(property)) {
			throw new MnoConfigurationException("Could not environment variable: " + environmentName);
		}
		return property;
	}
160924
public Map<String, String> getEnvProperty() {
		Map<String, String> res = new TreeMap<String, String>();
		MutablePropertySources mps = env.getPropertySources();
        Iterator<PropertySource<?>> iter = mps.iterator();
        while (iter.hasNext()) {
            PropertySource<?> ps = iter.next();
            if (ps instanceof EnumerablePropertySource<?>) {
                for (String propName : ((EnumerablePropertySource<?>) ps).getPropertyNames()) {
                	try {
                		res.put(propName, env.getProperty(propName));
					} catch (Exception e) {
						LOGGER.warn("unresolveable property: " + propName);
						res.put(propName, "UNRESOLVEABLE");
					}
                	
                }
            }
        }
        return res;
	}
90015
def _get_envvar_value(self):
        
        envvar_name = None

        if self.envvar is True:
            envvar_name = self.envvar_name
            if envvar_name is None:
                envvar_name = '_'.join(self.get_path()).upper()
        elif self.envvar:
            envvar_name = self.envvar

        if envvar_name and envvar_name in os.environ:
            return self.type.deserialize(os.environ[envvar_name])
        else:
            return not_set
581539
private function compactEnv(Environment $env)
    {
        for ($envs = []; $env; $env = $env->parent) {
            $envs[] = $env;
        }

        return $envs;
    }
597842
public static String getProperty(String key, String defaultValue) {
        String env = System.getenv(key);
        if (env != null && !"".equals(env)) {
            return env;
        }
        return System.getProperty(key, defaultValue);
    }
597663
public static Map<String, String> extractFrom(Function<String, String> env) {
    Map<String, String> headers = new LinkedHashMap<>();
    addHeader(headers, env, NetflixHeader.ASG, NETFLIX_ASG);
    addHeader(headers, env, NetflixHeader.Node, NETFLIX_NODE);
    addHeader(headers, env, NetflixHeader.Zone, NETFLIX_ZONE);
    return headers;
  }
1300768
public static Environment of(@NonNull Properties props) {
        var environment = new Environment();
        environment.props = props;
        return environment;
    }