0

I'm trying to run the Closure Compiler from inside PowerShell:

& $javaPath -jar $closurePath --js $jsCombinedPath --js_output_file $jsMinifiedPath

It writes the minified file to $jsMinifiedPath and outputs that in console. If there are warnings then it throws them into console too.

Is there anyway to prevent it from writing to the console? I tried

& $javaPath -jar $closurePath --js $jsCombinedPath --js_output_file $jsMinifiedPath  | out-null

But it's not working (I'm new to PowerShell, so I'm not sure if this is right)

Sheshbabu
  • 248
  • 2
  • 6

1 Answers1

0

Verify $jsMinifiedPath is not empty. The compiler will continue to use standard out if it is.

John
  • 5,443
  • 15
  • 21