diff --git a/pgetinker/Compiler.php b/pgetinker/Compiler.php index bca6d5f..cb48cde 100644 --- a/pgetinker/Compiler.php +++ b/pgetinker/Compiler.php @@ -123,7 +123,18 @@ public function getOutput($raw = false) if($raw) return implode("\n", $this->output); - return str_replace("/opt/emsdk/upstream/emscripten/cache/sysroot", "/***", implode("\n", $this->output)); + $filtered = []; + + foreach($this->output as $text) + { + // skip cache messages + if(strpos($text, "cache") === 0) + continue; + + $filtered[] = str_replace("/opt/emsdk/upstream/emscripten/cache/sysroot", "/***", $text); + } + + return implode("\n", $filtered); } public function getErrorOutput($raw = false) @@ -131,7 +142,18 @@ public function getErrorOutput($raw = false) if($raw) return implode("\n", $this->errors); - return str_replace("/opt/emsdk/upstream/emscripten/cache/sysroot", "/***", implode("\n", $this->errors)); + $filtered = []; + + foreach($this->errors as $text) + { + // skip cache messages + if(strpos($text, "cache") === 0) + continue; + + $filtered[] = str_replace("/opt/emsdk/upstream/emscripten/cache/sysroot", "/***", $text); + } + + return implode("\n", $filtered); } public function getHtml() @@ -648,7 +670,7 @@ public function build() Storage::disk("local")->deleteDirectory($this->workingDirectory); Log::info("Compile: finished successfully"); - + $this->output[] = "Compiled Successfully"; return true; } diff --git a/resources/js/app.js b/resources/js/app.js index 63f6661..fc50a15 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -336,7 +336,8 @@ class PGEtinker compileSuccessHandler(data) { - this.compilerOutputPanel.setContent(data.stderr); + console.log(data); + this.compilerOutputPanel.setContent(data.stdout + data.stderr); this.playerPanel.setHtml(data.html); this.compiling = false; }