Fix PATH corruption on Unix/Linux: use os.pathsep instead of hardcoded semicolons#119
Open
YusDyr wants to merge 1 commit into
Open
Fix PATH corruption on Unix/Linux: use os.pathsep instead of hardcoded semicolons#119YusDyr wants to merge 1 commit into
YusDyr wants to merge 1 commit into
Conversation
…d semicolons The PATH separator is `:` on Unix and `;` on Windows. Using hardcoded semicolons corrupts PATH on non-Windows platforms, making executables in later PATH directories unreachable for the entire process and all child subprocesses. Fixes TeamPyOgg#118 Co-Authored-By: Claude Opus 4.6 <[email protected]>
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.
Summary
";"withos.pathsepinlibrary_loader.pylines 104-105 and 120-121os.pathsepis:on Unix/Linux/macOS and;on Windows — correct for both platformsProblem
The current code unconditionally uses
;(Windows PATH separator) when appending toos.environ["PATH"]. On Unix systems this corrupts PATH for the entire process and all child subprocesses, making executables in later PATH entries unreachable.Real-world impact: In Home Assistant (Linux/Docker), importing PyOgg causes
/bin/date,/bin/ln,/bin/statto become unavailable in shell subprocesses, while/usr/bin/ffmpeg(before the corruption point) still works. This creates extremely confusing failures in unrelated components.Fix
Applied to both
load_other()andload_windows()methods.Fixes #118
🤖 Generated with Claude Code