[Fix]installer failure on Windows with spaces in path#940
Merged
4pmtong merged 4 commits intoeigent-ai:mainfrom Jan 19, 2026
Merged
Conversation
The `uv` executable path was not quoted, causing failures on Windows when the user profile path contained spaces (e.g. "C:\Users\John Doe\.eigent\bin\uv.exe"). This occurs because `spawn` with `shell: true` parses the space as an argument separator. This change wraps the `uv_path` in double quotes when constructing `npmCommand` and `npxCommand`, ensuring the shell treats the full path as the executable. Also fixed a missing mock for `getUvEnv` in `test/mocks/environmentMocks.ts` which was causing unit tests to fail.
The `uv` executable path was not quoted, causing failures on Windows when the user profile path contained spaces (e.g. "C:\Users\John Doe\.eigent\bin\uv.exe"). This occurs because `spawn` with `shell: true` parses the space as an argument separator. This change wraps the `uv_path` in double quotes when constructing `npmCommand` and `npxCommand`, ensuring the shell treats the full path as the executable. Also fixed a missing mock for `getUvEnv` in `test/mocks/environmentMocks.ts` which was causing unit tests to fail.
The `uv` executable path was not quoted, causing failures on Windows when the user profile path contained spaces (e.g. "C:\Users\John Doe\.eigent\bin\uv.exe"). This occurs because `spawn` with `shell: true` parses the space as an argument separator. This change wraps the `uv_path` in double quotes when constructing `npmCommand` and `npxCommand`, ensuring the shell treats the full path as the executable. Also fixed a missing mock for `getUvEnv` in `test/mocks/environmentMocks.ts` which was causing unit tests to fail.
Contributor
|
thanks @sashimikun for the contribution! could @4pmtong @LuoPengcheng12138 help checking this? |
4pmtong
approved these changes
Jan 19, 2026
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.
Description
This PR fixes a bug where the installer fails on Windows machines when the user profile path contains spaces (e.g.,
C:\Users\John Doe). The issue was caused by theuvexecutable path not being quoted when executingnpmandnpxcommands withshell: true. Without quotes, the shell interprets the space as an argument separator. This change adds quotes around theuvpath to ensure it is treated as a single argument. Additionally, it includes a fix for the test mocks to ensure unit tests pass.Address Issue: #891
Verification:
What is the purpose of this pull request?