From 850172984ac8a9cdd1e984a1c24ad214425d5b8a Mon Sep 17 00:00:00 2001 From: bambu Date: Fri, 27 May 2016 20:19:08 -0400 Subject: [PATCH] Enviornment value is joined by '=' --- src/app.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app.mm b/src/app.mm index df42c20..f794ba1 100644 --- a/src/app.mm +++ b/src/app.mm @@ -57,14 +57,15 @@ - (NSDictionary *)environmentFromLoginShell:(NSString *)shellPath NSMutableDictionary *env = [NSMutableDictionary new]; for (NSString *s in envVars) { - NSArray *keyvalue = [s componentsSeparatedByString:@"="]; + NSMutableArray *keyvalue = [[s componentsSeparatedByString:@"="] mutableCopy]; if (keyvalue.count < 2) { continue; } NSString *key = keyvalue[0]; - NSString *value = keyvalue[1]; + [keyvalue removeObjectAtIndex:0]; + NSString *value = [keyvalue componentsJoinedByString:@"="]; env[key] = value; }