Skip to content

fix: properly quote Python command in depot_tools check#866

Open
dsanders11 wants to merge 1 commit into
mainfrom
fix/windows-chromium-build-tools-path-check
Open

fix: properly quote Python command in depot_tools check#866
dsanders11 wants to merge 1 commit into
mainfrom
fix/windows-chromium-build-tools-path-check

Conversation

@dsanders11
Copy link
Copy Markdown
Member

The check to see if we have a new enough depot_tools to not need CHROMIUM_BUILDTOOLS_PATH wasn't working on Windows because the Python command needs to be properly quoted.

@dsanders11 dsanders11 requested review from a team and ckerr as code owners May 22, 2026 06:53
Comment thread src/utils/depot-tools.ts
config,
'python3',
['-c', 'from gclient_paths import GetBuildtoolsPath; print(GetBuildtoolsPath() or "")'],
['-c', process.platform === 'win32' ? `"${pythonCommand}"` : pythonCommand],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the platform check needed? Seems like it would be less work + safer to always quote it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary, but I was opting for the least amount of change to avoid unintentionally breaking anything else. 😅 This code is temporary and will be pulled out in a few months anyway, so was opting to only change the already broken code path. Should be fine to do on all platforms.

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.

2 participants