mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-08 04:20:07 +02:00
⚡️ Use Command.execute to retrieve PHP version
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user