Skip to content

main: Fixes an incorrectly constructed environment PATH resulting in failure to subprocess system applications#132

Open
joshanne wants to merge 1 commit into
dronecan:masterfrom
joshanne:pr/fix-incorrectly-constructed-environment-path
Open

main: Fixes an incorrectly constructed environment PATH resulting in failure to subprocess system applications#132
joshanne wants to merge 1 commit into
dronecan:masterfrom
joshanne:pr/fix-incorrectly-constructed-environment-path

Conversation

@joshanne

@joshanne joshanne commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

While testing on Fedora 44, noticed that _linux_parse_ip_link_show was failing to run ip link show.

After investigating, it was because /usr/bin was being dropped off the PATH because the windows hack made the PATH look like: /home/user/.local/bin:/home/user/bin:/usr/local/bin:/usr/bin;/usr/bin.

That Windows PATH separator resulted in the /usr/bin folder not being usable on the PATH, and thus ip link show could not run.

We fix this by using os.pathsep to determine the appropriate path separator, and ensure the PATH is constructed correctly.

…failure to launch applications

While testing on Fedora 44, noticed that `_linux_parse_ip_link_show` was failing to run `ip link show`.

After investigating, it was because `/usr/bin` was being dropped off the PATH because the windows hack made the PATH look like: `/home/user/.local/bin:/home/user/bin:/usr/local/bin:/usr/bin;/usr/bin`.

That Windows PATH separator resulted in the `/usr/bin` folder not being usable on the PATH, and thus `ip link show` could not run.
@joshanne

joshanne commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

I've set up VMs for the latest of Fedora, Ubuntu and Debian.

Ubuntu and Debian appear to be immune.

On Ubuntu at least, there's an ip at /bin/ip and /sbin/ip, there's also symlinks at /usr/bin/ip and /usr/sbin/ip. So if the PATH is contains an invalid directory because of an incorrect path separator, we have at least 3 other folders where we can try find the command.

On Fedora, this error happens straight out of the box with a fresh install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant