1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2026-03-27 14:30:08 +01: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
init() {
let version = Shell.user
// Get the version directly from PHP
.pipe("php -r 'print phpversion();'")
let version = Command.execute(path: "/usr/local/bin/php", arguments: ["-r", "print phpversion();"])
// That's the long version
self.long = version