Skip to content

Commit 6b304c2

Browse files
petebacondarwinnetman92
authored andcommitted
chore(utils.js): only set maximum stack size on non-win32 machines
Closes angular#4831
1 parent ebe124a commit 6b304c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/grunt/utils.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ module.exports = {
190190
shell.exec(
191191
'java ' +
192192
this.java32flags() + ' ' +
193-
'-Xmx2g ' +
193+
this.memoryRequirement() + ' ' +
194194
'-cp bower_components/closure-compiler/compiler.jar' + classPathSep +
195195
'bower_components/ng-closure-runner/ngcompiler.jar ' +
196196
'org.angularjs.closurerunner.NgClosureRunner ' +
@@ -217,6 +217,10 @@ module.exports = {
217217
}.bind(this));
218218
},
219219

220+
memoryRequirement: function() {
221+
return (process.platform === 'win32') ? '' : '-Xmx2g';
222+
},
223+
220224

221225
//returns the 32-bit mode force flags for java compiler if supported, this makes the build much faster
222226
java32flags: function(){

0 commit comments

Comments
 (0)