Revert "Added rudimentary system environment variable support. (#284)" (#470)

This reverts commit 7a8fd62535.
This commit is contained in:
luancurti 2020-07-12 23:38:47 -03:00 committed by GitHub
parent d8f35bce1a
commit eb4b9c5eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -50,7 +50,7 @@ def loadDotEnv(flavor = getCurrentFlavor()) {
f.eachLine { line ->
def matcher = (line =~ /^\s*(?:export\s+|)([\w\d\.\-_]+)\s*=\s*['"]?(.*?)?['"]?\s*$/)
if (matcher.getCount() == 1 && matcher[0].size() == 3) {
env.put(matcher[0][1], System.env[matcher[0][1]] || matcher[0][2].replace('"', '\\"'))
env.put(matcher[0][1], matcher[0][2].replace('"', '\\"'))
}
}
} else {

View File

@ -8,8 +8,6 @@
}
+ (NSString *)envFor: (NSString *)key {
NSString *envValue = (NSString *)[[[NSProcessInfo processInfo]environment]objectForKey:key];
if (envValue) return envValue;
NSString *value = (NSString *)[self.env objectForKey:key];
return value;
}