Skip to content

Commit

Permalink
fix: case-sensitive windows PATH setting for python configuration (ne…
Browse files Browse the repository at this point in the history
…xe#481)

fixes nexe#474
amends nexe#476

related to nodejs/node#20605
  • Loading branch information
JamesMGreene authored and calebboyd committed May 8, 2018
1 parent 8ec3029 commit a08ebfa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/compiler.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -60,8 +60,9 @@ export class NexeCompiler<T extends NexeOptions = NexeOptions> {
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 }
Expand Down

0 comments on commit a08ebfa

Please sign in to comment.