Skip to content

Commit

Permalink
Better Instructor concept img to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ddebowczyk committed Mar 16, 2024
1 parent 3892913 commit 0a6a7e0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Binary file modified docs/img/concept.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 16 additions & 2 deletions src-hub/Services/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ public function __construct(
///////////////////////////////////////////////////////////////////////////////////////////////////

public function runSingle(Example $example) : void {
$this->runFile($example);
$this->displayErrors();
//$this->runFile($example);
$this->executeAndShow($example->runPath);
//$this->displayErrors();
}

public function runAll() : void {
Expand Down Expand Up @@ -62,6 +63,19 @@ private function execute(string $runPath) : string {
return $output . $bufferedOutput;
}

private function executeAndShow(string $runPath) : void {
//ob_start();
try {
$command = 'php ' . $runPath;// . ' 2>&1';
$output = shell_exec($command);
} catch (Exception $e) {
$output = $e->getMessage();
}
//$bufferedOutput = ob_get_contents();
//ob_end_clean();
//return $output . $bufferedOutput;
}

private function processOutput(string $output, Example $example) : bool {
Cli::grid([[1, ">", STR_PAD_RIGHT, Color::DARK_GRAY]]);
if (strpos($output, 'Fatal error') !== false) {
Expand Down

0 comments on commit 0a6a7e0

Please sign in to comment.