fix script to configure feature flags that cannot enable flags

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.
This commit is contained in:
Kazunori Kimura 2024-08-14 00:50:24 +09:00 committed by Steven Achilles
parent 9508fcb63a
commit 080b645685

View File

@ -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)