fix(local): remove duplicate creationflags in _run_bash() on Windows#28898
Open
EloquentBrush0x wants to merge 1 commit into
Open
fix(local): remove duplicate creationflags in _run_bash() on Windows#28898EloquentBrush0x wants to merge 1 commit into
EloquentBrush0x wants to merge 1 commit into
Conversation
_run_bash() passes both an explicit
`creationflags=subprocess.CREATE_NO_WINDOW if _IS_WINDOWS else 0`
keyword argument and `**_popen_kwargs` which on Windows contains
`{"creationflags": windows_hide_flags()}`. Python raises
`TypeError: Popen.__init__() got multiple values for keyword argument
'creationflags'` for every shell command on Windows.
Introduced in NousResearch#28874, which correctly removed the legacy
`creationflags=` line in `process_registry.py` but left it in
`local.py`. Fix: remove the stale explicit argument so `**_popen_kwargs`
is the sole source of `creationflags`, matching the pattern already in
`tools/process_registry.py` (line 566).
This was referenced May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Root cause:
#28874added_popen_kwargs = {"creationflags": windows_hide_flags()} if _IS_WINDOWS else {}and**_popen_kwargsto thesubprocess.Popencall inLocalEnvironment._run_bash(), but did not remove the pre-existing explicit argument:On Windows, Python raises
TypeError: Popen.__init__() got multiple values for keyword argument 'creationflags'on every shell command execution —_run_bash()is completely broken.Fix: remove the stale explicit
creationflags=argument so**_popen_kwargsis the sole source ofcreationflags, matching the pattern already applied correctly intools/process_registry.py(line 566) by the same PR.Related Issue
Regression introduced in #28874.
Type of Change
Changes Made
tools/environments/local.py: remove duplicatecreationflags=subprocess.CREATE_NO_WINDOW if _IS_WINDOWS else 0keyword argument fromsubprocess.Popencall in_run_bash()(-1 line)How to Test
Checklist