From 8244b4b163ba1f1dc432f170eaf95b7b4009a2a6 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 23 Feb 2022 10:51:31 +0100 Subject: [PATCH] DEV: prevents warnings with EMBER_CLI being redefined (#16035) Example error: ``` /__w/discourse/discourse/lib/tasks/assets.rake:3: warning: already initialized constant EMBER_CLI /__w/discourse/discourse/lib/tasks/assets.rake:3: warning: previous definition of EMBER_CLI was here ``` --- lib/tasks/assets.rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 988a6d9a018..9a504ab46a6 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -1,6 +1,8 @@ # frozen_string_literal: true -EMBER_CLI = ENV["EMBER_CLI_PROD_ASSETS"] != "0" +if !defined?(EMBER_CLI) + EMBER_CLI = ENV["EMBER_CLI_PROD_ASSETS"] != "0" +end task 'assets:precompile:before' do