Skip to content

Commit

Permalink
Merge pull request #260 from bambu/joined_environ
Browse files Browse the repository at this point in the history
Enviornment value is joined by '='
  • Loading branch information
rogual authored Jun 11, 2016
2 parents 526eabb + 8501729 commit c7fc6e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c7fc6e8

Please sign in to comment.