thanpolas / grunt-closure-tools

Google Closure Tools for grunt
MIT License
95 stars 22 forks source link

compilerFile does not expand environment variables #44

Closed fhurta closed 10 years ago

fhurta commented 10 years ago

Using npm (with global flag), the closure compiler is typically installed somewhere under user profile. However, using environment variable in path specification like this:

compilerFile: '%USERPROFILE%/AppData/Roaming/npm/node_modules/closurecompiler/compiler/compiler.jar'

either: compilerFile: '~/AppData...'

does not work. The environment variable is not expanded. (Using Win8, cmd + msysgit or powershell+msysgit)

thanpolas commented 10 years ago

try this:

compilerFile: process.env.USERPROFILE + '/AppData....'
fhurta commented 10 years ago

Cool, works! Thanks