From aef7dbd5bfdb4b105c31acf95616b5386f22a77d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Fri, 23 Jan 2026 04:43:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96php=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/data/environment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/data/environment.go b/internal/data/environment.go index 36791caf..afcddcc0 100644 --- a/internal/data/environment.go +++ b/internal/data/environment.go @@ -129,7 +129,7 @@ func (r *environmentRepo) InstalledVersion(typ, slug string) string { version, err = shell.Exec(filepath.Join(basePath, "bin", "node") + " -v | sed 's/v//'") case "php": // PHP 8.3.0 (cli) -> 8.3.0 - version, err = shell.Exec(filepath.Join(basePath, "bin", "php") + " -v | head -n 1 | awk '{print $2}'") + version, err = shell.Exec(filepath.Join(basePath, "bin", "php") + " -d error_reporting=0 -r 'echo PHP_VERSION;'") case "python": // Python 3.11.5 -> 3.11.5 version, err = shell.Exec(filepath.Join(basePath, "bin", "python3") + " --version | awk '{print $2}'")