thanpolas/grunt-closure-tools

compilerFile does not expand environment variables

Closed this issue · 2 comments

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)

try this:

compilerFile: process.env.USERPROFILE + '/AppData....'

Cool, works! Thanks