From 73c71f4bcac9d241de8ec475ccc7e7892f65a26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 19 Apr 2021 14:57:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Snowflake.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/System/Snowflake.php b/System/Snowflake.php index e5f0c29d..ae9e12d0 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -243,8 +243,8 @@ class Snowflake */ public static function isDcoker(): bool { - exec('[ -f /.dockerenv ] && echo yes || echo no', $output, $cod); - if ($cod === 0 && trim($output) === 'yes') { + $output = shell_exec('[ -f /.dockerenv ] && echo yes || echo no'); + if (trim($output) === 'yes') { return true; } return false;