We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bc1d1f commit 47e8c98Copy full SHA for 47e8c98
src/Contexts/SpecsContext.php
@@ -46,10 +46,10 @@ private function totalMemory()
46
{
47
if (PHP_OS === 'Linux') {
48
$output = shell_exec('free -m | grep Mem | awk \'{print $2}\'');
49
- $output = $output / 1024; // convert MB to GB
+ $output = trim($output) / 1024; // convert MB to GB
50
} elseif (PHP_OS === 'Darwin' || PHP_OS === 'FreeBSD') {
51
$output = shell_exec('sysctl -n hw.memsize');
52
- $output = $output / 1073741824; // convert bytes to GB
+ $output = trim($output) / 1073741824; // convert bytes to GB
53
} else {
54
throw new RuntimeException('Operating system not supported!');
55
}
0 commit comments