launcher: remove commented-out base flags from run environment #34
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/34"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from edsuuu/VI-BR-PORT. Originally posted by ahmetbagci8 on 2026-11-29T12:34:23Z.
Problem
In pps/vi-launcher, the Settings flags box displays the build's ase switches via lags::with_base. When a user comments out a base switch (e.g. # VICTORY_NO_WATCHDOG=1), lags::from_text parses it with enabled: false and lags::without_base keeps it in config.flags as enabled: false so it stays commented out in the UI.
However, options::run (pps/vi-launcher/src/options.rs:214) filters yped.iter().filter(|f| f.enabled && ...) and ignores enabled: false flags completely. As a result, ase.base.clone() leaves the commented-out base switch active in Run.env.
Fix
In options::run, map disabled (enabled: false) flags with a valid name to an empty value so env.insert(k, String::new()) + env.retain(|_, v| !v.is_empty()) removes them from Run.env (matching deleted base switches). Added unit test commented_out_base_flag_is_removed_from_run_env.
Verification
Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-29T13:20:46Z.
Review: APPROVED
Thanks, clean and well tested. It passed our full local CI together with the other fixes of this batch. Merged into
dev, where everything is tested in the game first; it reachesmainwith the next release.