Fix auto-upgrade to windowed mode with legacy installer. by Jesse205 · Pull Request #286 · python/pymanager (original) (raw)

Previously, I submitted an enhancement in #216 and supported it in #254. However, after updating pymanager to the latest version, a command line window still pops up. After my analysis, when using the legacy installer but not installing any Python through pymanager, the logic if is_wdefault or windowed: is not executed; instead, the code enters the if sh_cmd.match("python*.exe"): block. But this block does not support the aforementioned enhancement. This PR fixes this issue.

I've modified the existing tests for this fix. If there are any errors in my changes, please let me know.