Skip to content

Fix executable path with spaces breaking launch on Windows#2997

Merged
cbentejac merged 1 commit intodevelopfrom
copilot/fix-executable-path-issue
Feb 12, 2026
Merged

Fix executable path with spaces breaking launch on Windows#2997
cbentejac merged 1 commit intodevelopfrom
copilot/fix-executable-path-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

Description

On Windows, os.execv() reconstructs a command line by joining argv with spaces. When the executable lives under a path with spaces (e.g. C:\Program Files\Meshroom\), the path is split—C:\Program is treated as the executable and Files\... as an argument.

Replace os.execv() with subprocess.call() using a list, which invokes CreateProcess directly and handles quoting correctly.

Features list

  • Fix setupInitScriptWindows.py to handle spaces in executable path

Implementation remarks

subprocess.call([sys.executable] + sys.argv[1:]) passes arguments as a list, bypassing the broken command-line reconstruction that os.execv does on Windows. sys.exit() wraps the call to preserve the exit code and prevent the rest of the init script from executing.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix executable path issue with spaces on Windows Fix executable paths with spaces breaking launch on Windows Feb 11, 2026
Copilot AI requested a review from fabiencastan February 11, 2026 11:01
@cbentejac
Copy link
Copy Markdown
Contributor

@copilot The changes made to localFarmSubmitter.py are irrelevant to the problem, they should be discarded. However the changes in setupInitScriptWindows.py are correct and are indeed solving the issue that was encountered; they should be kept.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 12, 2026

@copilot The changes made to localFarmSubmitter.py are irrelevant to the problem, they should be discarded. However the changes in setupInitScriptWindows.py are correct and are indeed solving the ...

Reverted the localFarmSubmitter.py changes in ab20c1b, keeping only the setupInitScriptWindows.py fix.

Copilot AI requested a review from cbentejac February 12, 2026 17:15
Copilot AI changed the title Fix executable paths with spaces breaking launch on Windows Fix executable path with spaces breaking launch on Windows Feb 12, 2026
- setupInitScriptWindows.py: Replace os.execv() with subprocess.call()
  which properly handles paths with spaces by using a list of arguments
  instead of reconstructing a command line string. On Windows, os.execv()
  internally joins argv into a command line string, causing paths with
  spaces (e.g. "C:/Program Files/...") to be split incorrectly.

Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
Co-authored-by: cbentejac <11963329+cbentejac@users.noreply.github.com>
@cbentejac cbentejac force-pushed the copilot/fix-executable-path-issue branch from ab20c1b to 1bb3306 Compare February 12, 2026 17:21
@cbentejac cbentejac marked this pull request as ready for review February 12, 2026 17:22
@cbentejac cbentejac added this to the Meshroom 2026.1.0 milestone Feb 12, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.01%. Comparing base (419a4c7) to head (1bb3306).
⚠️ Report is 18 commits behind head on develop.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2997      +/-   ##
===========================================
+ Coverage    81.67%   82.01%   +0.34%     
===========================================
  Files           69       69              
  Lines         9144     9310     +166     
===========================================
+ Hits          7468     7636     +168     
+ Misses        1676     1674       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cbentejac cbentejac merged commit 912a71d into develop Feb 12, 2026
4 checks passed
@cbentejac cbentejac deleted the copilot/fix-executable-path-issue branch February 12, 2026 17:25
@cbentejac cbentejac linked an issue Feb 13, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Can't open Meshroom

3 participants