From 080b645685641b99edc259dcf3b82c8a1e6656e7 Mon Sep 17 00:00:00 2001 From: Kazunori Kimura Date: Wed, 14 Aug 2024 00:50:24 +0900 Subject: [PATCH] fix script to configure feature flags that cannot enable flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When generating the list of flags that would actually be enabled, the value specified in the option was ANDed with the list of flags that actually existed. At this time, I mistakenly performed a logical AND with the list of "values ​​to invalidate" specified in the option. This mistake caused a problem in which some flags could not be enabled. This commit fixes this to AND with the list of values ​​you want to enable. --- assets/runtime/scripts/configure_feature_flags.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/runtime/scripts/configure_feature_flags.rb b/assets/runtime/scripts/configure_feature_flags.rb index 90ccd2dc..efe1368a 100644 --- a/assets/runtime/scripts/configure_feature_flags.rb +++ b/assets/runtime/scripts/configure_feature_flags.rb @@ -64,7 +64,7 @@ class FeatureFlagCLI if succeed available_flags = self.available_feature_flags disable_targets = available_flags & opts[:to_be_disabled] - enable_targets = available_flags & opts[:to_be_disabled] + enable_targets = available_flags & opts[:to_be_enabled] disable_targets.each do |feature| Feature.disable(feature)