Skip to content

Commit

Permalink
remove cache messages from compiler output
Browse files Browse the repository at this point in the history
  • Loading branch information
Moros1138 committed Jun 9, 2024
1 parent b9172dc commit 9ce6d02
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
28 changes: 25 additions & 3 deletions pgetinker/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,37 @@ 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)
{
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()
Expand Down Expand Up @@ -648,7 +670,7 @@ public function build()
Storage::disk("local")->deleteDirectory($this->workingDirectory);

Log::info("Compile: finished successfully");

$this->output[] = "Compiled Successfully";
return true;
}

Expand Down
3 changes: 2 additions & 1 deletion resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9ce6d02

Please sign in to comment.