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:
@ -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
|
||||
|
Reference in New Issue
Block a user