MCPcopy Create free account
hub / github.com/diffplug/goomph / get

Method get

src/main/java/com/diffplug/gradle/EnvMisc.java:21–28  ·  view source on GitHub ↗

Returns the given environment variable, throwing a descriptive error if it doesn't exist.

(String key, String whatItIs)

Source from the content-addressed store, hash-verified

19public class EnvMisc {
20 /** Returns the given environment variable, throwing a descriptive error if it doesn't exist. */
21 public static String get(String key, String whatItIs) {
22 String value = System.getenv(key);
23 if (value != null) {
24 return value;
25 } else {
26 throw new IllegalArgumentException("You must set environment variable '" + key + "' to " + whatItIs);
27 }
28 }
29
30 /** Returns the given environment variable, printing a descriptive warning and using a default value if it doesn't exist. */
31 public static String getOptional(String key, String defaultValue, String whatItIs) {

Callers 15

diff_charsToLinesMethod · 0.80
match_bitapMethod · 0.80
match_alphabetMethod · 0.80
testCaseMethod · 0.80
satisfyAndGetMethod · 0.80
indexOfMethod · 0.80
isOrderedMethod · 0.80
modifyMethod · 0.80

Calls

no outgoing calls

Tested by 8

diff_charsToLinesMethod · 0.64
match_bitapMethod · 0.64
match_alphabetMethod · 0.64
testCaseMethod · 0.64