From 2a8b1127ed27175c98552495b92406ac9cf7871e Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Thu, 23 Feb 2023 09:59:13 +0100 Subject: [PATCH] Fix CLI warnings --- bref | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bref b/bref index ae003a019..56938acd7 100755 --- a/bref +++ b/bref @@ -61,7 +61,10 @@ function telemetry() { } // Check if we are running in CI - $ci = $_SERVER['CI'] || $_SERVER['CONTINUOUS_INTEGRATION'] || $_SERVER['BUILD_NUMBER'] || $_SERVER['CI_APP_ID'] || $_SERVER['CI_NAME'] || $_SERVER['RUN_ID'] || $_SERVER['BUILD_ID']; + $ciVars = ['CI', 'CONTINUOUS_INTEGRATION', 'BUILD_NUMBER', 'CI_APP_ID', 'CI_NAME', 'RUN_ID', 'BUILD_ID']; + $ci = array_reduce($ciVars, function ($carry, $item) { + return $carry || (isset($_SERVER[$item]) && $_SERVER[$item]); + }, false); $message = json_encode([ 'cli' => 'vendor/bin/bref',