refactor: Simplify plugin option handling by removing unnecessary flags. Update logic to determine if a plugin is forced based solely on the presence of options, enhancing clarity in plugin processing.

This commit is contained in:
Eli Bosley
2025-11-24 10:58:08 -05:00
parent 22ff21f712
commit f6370ef331

View File

@@ -618,8 +618,7 @@ if ($method == 'install' || $method == 'download') {
done(1);
}
}
$non_flag_options = array_diff($options, ['force', 'forced']);
$forced = in_array('force', $options, true) || in_array('forced', $options, true) || !empty($non_flag_options);
$forced = !empty($options);
if (pathinfo($plugin, PATHINFO_EXTENSION) != "plg") {
write("plugin: $plugin is not a plg file\n");
done(1);