-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da992ed
commit 2e75d9a
Showing
7 changed files
with
43 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Studio\Shell; | ||
|
||
use Symfony\Component\Process\Process; | ||
|
||
class Shell | ||
{ | ||
|
||
public static function run($task, $directory = null) | ||
{ | ||
$process = new Process("$task", $directory); | ||
$process->setTimeout(3600); | ||
|
||
$process->run(); | ||
|
||
if (! $process->isSuccessful()) { | ||
$command = collect(explode(' ', $task))->first(); | ||
$error = $process->getErrorOutput(); | ||
throw new \RuntimeException("Error while running $command: $error"); | ||
} | ||
|
||
return $process->getOutput(); | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.