Skip to content

Conversation

@alex-lisi
Copy link
Contributor

Description

Fixes installation failure when Python is installed in a directory containing spaces (e.g., C:\Program Files\Python37\).

Changes

  • Modified call_pkg_script() in platformio/package/manager/base.py to wrap the Python executable path in quotes when it contains spaces
  • Added isinstance(cmd, list) check before accessing list elements (addresses feedback from Fix: Quote Python path to handle spaces in postinstall scripts #5363)
  • This prevents the shell from incorrectly splitting the path during postinstall script execution

Testing

Related Issue

Fixes #5361

Notes

This is a revised version of #5363 incorporating maintainer feedback.

Wraps Python executable path in quotes when it contains spaces before executing package postinstall scripts. This fixes installation failures on Windows when Python is installed in directories like 'Program Files'.

Fixes #5361
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