From a08ebfa0f8764f6cbc66cf70aafd1a59185e2af7 Mon Sep 17 00:00:00 2001 From: "James M. Greene" Date: Tue, 8 May 2018 13:47:16 -0500 Subject: [PATCH] fix: case-sensitive windows PATH setting for python configuration (#481) fixes #474 amends #476 related to nodejs/node#20605 --- src/compiler.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 82d3a1c5..04cfebee 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -1,4 +1,4 @@ -import { dirname, normalize, join } from 'path' +import { delimiter, dirname, normalize, join } from 'path' import { Buffer } from 'buffer' import { createHash } from 'crypto' import { createReadStream } from 'fs' @@ -60,8 +60,9 @@ export class NexeCompiler { if (isWindows) { // Do a little shuffling to correctly set the PATH regardless of property name case sensitivity const originalPath = process.env.PATH - process.env.PATH = dequote(normalize(python)) + ';' + originalPath + delete process.env.PATH this.env = { ...process.env } + this.env.PATH = dequote(normalize(python)) + delimiter + originalPath process.env.PATH = originalPath } else { this.env = { ...process.env }