Skip to content

Commit

Permalink
Add OS info to Error output
Browse files Browse the repository at this point in the history
  • Loading branch information
theseer committed May 18, 2020
1 parent 45f2200 commit 0f2f99d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/shared/environment/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,23 @@ public function ensureFitness(): void {

public function getRuntimeString(): string {
return \sprintf(
'PHP %s',
$this->getRuntimeVersion()
'PHP %s (on %s)',
$this->getRuntimeVersion(),
$this->getOperatingSystem()
);
}

public function getRuntimeVersion(): string {
return \PHP_VERSION;
}

public function getOperatingSystem() {
return sprintf('%s %s',
\php_uname('s'),
\php_uname('r')
);
}

public function isInteractive(): bool {
if (!\function_exists('posix_isatty')) {
return false;
Expand Down

0 comments on commit 0f2f99d

Please sign in to comment.