Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Split exported variables only on the first occurrence of '='.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-shatskyi committed Jun 15, 2016
1 parent 6b66036 commit 8b40cfc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ const executors: Dictionary<(i: Job, a: string[]) => void> = {
job.screenBuffer.writeMany(job.environment.map((key, value) => `${key}=${value}`).join("\r\n"));
} else {
args.forEach(argument => {
const [key, value] = argument.split("=");
const firstEqualIndex = argument.indexOf("=");
const key = argument.slice(0, firstEqualIndex);
const value = argument.slice(firstEqualIndex + 1);

job.session.environment.set(key, value);
});
}
Expand Down

0 comments on commit 8b40cfc

Please sign in to comment.