Skip to content

Commit

Permalink
Dev: finetuning on compile assets command
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Dec 15, 2017
1 parent 20f1cbe commit f9ace06
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions application/commands/CompileAssetsCommand.php
Expand Up @@ -60,11 +60,13 @@ public function run($aArguments)
}

$logfile = false;
if($silent == true && gettype($silent) == "string"){

if($silent == true && $silent !=="1" ){
$logfile = $silent;
} else if($silent == true){
$logfile ="> /dev/null";
} else if($silent == true && $silent==="1"){
$logfile =" /dev/null";
}

switch($method){
case "gulp" :
$this->liveExecuteCommand("(cd {$packageFolder} && {$method})", $logfile );
Expand All @@ -84,7 +86,7 @@ private function liveExecuteCommand($cmd, $logfile=false)
while (@ ob_end_flush()); // end all output buffers if any

if($logfile!==false){
$proc = popen("$cmd 2>&1 > {$logfile}; echo Exit status : $?", 'r');
$proc = popen("$cmd >{$logfile} 2>&1; echo Exit status : $?", 'r');
} else {
$proc = popen("$cmd 2>&1 ; echo Exit status : $?", 'r');
}
Expand Down

0 comments on commit f9ace06

Please sign in to comment.