Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Commit

Permalink
Fix for Empty JAVA executable path and JAVA path with spaces (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
nigrosimone authored Feb 27, 2017
1 parent 8fd5901 commit 466bda3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
9 changes: 8 additions & 1 deletion lib/Minify/Minify/YUICompressor.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,14 @@ private static function _getCmd($userOptions, $type, $tmpFile)
)
,$userOptions
);
$cmd = self::$javaExecutable

$javaExecutable = self::$javaExecutable;

if( false !== strpos(trim($javaExecutable), ' ') ){
$javaExecutable = '"'.$javaExecutable.'"';
}

$cmd = $javaExecutable
. (!empty($o['stack-size'])
? ' -Xss' . $o['stack-size']
: '')
Expand Down
12 changes: 6 additions & 6 deletions pub/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -1153,24 +1153,24 @@ jQuery(function() {
case 'yuijs':
jQuery.extend(params, {
engine: 'yuijs',
path_java: jQuery('#minify__yuijs__path__java').val(),
path_jar: jQuery('#minify__yuijs__path__jar').val()
path_java: jQuery('#minify_yuijs_path_java').val(),
path_jar: jQuery('#minify_yuijs_path_jar').val()
});
break;

case 'yuicss':
jQuery.extend(params, {
engine: 'yuicss',
path_java: jQuery('#minify__yuicss__path__java').val(),
path_jar: jQuery('#minify__yuicss__path__jar').val()
path_java: jQuery('#minify_yuicss_path_java').val(),
path_jar: jQuery('#minify_yuicss_path_jar').val()
});
break;

case 'ccjs':
jQuery.extend(params, {
engine: 'ccjs',
path_java: jQuery('#minify__ccjs__path__java').val(),
path_jar: jQuery('#minify__ccjs__path__jar').val()
path_java: jQuery('#minify_ccjs_path_java').val(),
path_jar: jQuery('#minify_ccjs_path_jar').val()
});
break;
case 'googleccjs':
Expand Down

0 comments on commit 466bda3

Please sign in to comment.