From 24555bcd75c2f16cb9f691d589222332ed219a65 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Mon, 11 Jul 2016 16:40:23 -0500 Subject: [PATCH] check for env.path case-insesitive in windows --- src/beautifiers/beautifier.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/beautifiers/beautifier.coffee b/src/beautifiers/beautifier.coffee index 759961d..e369ac6 100644 --- a/src/beautifiers/beautifier.coffee +++ b/src/beautifiers/beautifier.coffee @@ -170,6 +170,14 @@ module.exports = class Beautifier new Promise((resolve, reject) => options.path ?= env.PATH if @isWindows + # Environment variables are case-insensitive in windows + # Check env for a case-insensitive 'path' variable + if !options.path + for i of env + if i.toLowerCase() is "path" + options.path = env[i] + break + # Trick node-which into including files # with no extension as executables. # Put empty extension last to allow for other real extensions first