1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-07 20:10:08 +02:00

️ Use Command.execute to retrieve PHP version

This commit is contained in:
2019-11-20 08:43:09 +01:00
parent 3e898d435b
commit 69c3386088

View File

@ -17,9 +17,7 @@ class PhpVersion {
var xdebugEnabled : Bool = false var xdebugEnabled : Bool = false
init() { init() {
let version = Shell.user let version = Command.execute(path: "/usr/local/bin/php", arguments: ["-r", "print phpversion();"])
// Get the version directly from PHP
.pipe("php -r 'print phpversion();'")
// That's the long version // That's the long version
self.long = version self.long = version