Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows space in folder not allowed #116

Closed
deka opened this issue Jan 5, 2023 · 2 comments
Closed

Windows space in folder not allowed #116

deka opened this issue Jan 5, 2023 · 2 comments
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@deka
Copy link

deka commented Jan 5, 2023

Describe the bug
On windows, When folder name has spaces, command line to run test fail.

To Reproduce
Run vitest on widows with a folder name with spaces

Expected behavior
Support space in folder names

Screenshots

Example error :

[INFO 14:38:16] Vitest Workspace [npm - package-with-space]: Vitest version = 0.25.8
[INFO 14:38:22] Tests run start
[INFO 14:38:22] [Workspace "npm - package-with-space] Run tests from workspace
[INFO 14:38:22] [Execute Vitest] d:/users/popol/git/npm - package-with-space/node_modules/.bin/vitest.cmd /users/popol/git/npm - package-with-space/src/components/PBtn.spec.ts -t "GIVEN PBtn WHEN default slot is used with text 'text'"
[INFO 14:38:22] Start api process at port 61954
[INFO 14:38:22] [RUN] d:/users/popol/git/npm - package-with-space/node_modules/.bin/vitest.cmd /users/popol/git/npm - package-with-space/src/components/PBtn.spec.ts -t "GIVEN PBtn WHEN default slot is used with text 'text'"
[INFO 14:38:22] [RUN.cwd] d:/users/popol/git/npm - package-with-space
[Error 14:38:22] Process exited with code 1
[INFO 14:38:22] 'd:/users/popol/git/npm' is not recognized as an internal or external command,

Environment

  • OS: Windows
  • VSCode version: 1.72
  • Vitest version: 0.25.6
  • Vitest plugin version: 0.2.36
@deka deka added the p3-minor-bug An edge case that only affects very specific usage (priority) label Jan 5, 2023
@zxch3n zxch3n closed this as completed Feb 8, 2023
@zxch3n
Copy link
Member

zxch3n commented Feb 8, 2023

Close as #118 merged

@dorin1000
Copy link

This issue came back it appears. In my case the package running the tests is part of a larger project, but VS Code is started from the package and not at the root of the larger project and the package folder is a VS Code workspace. The space in the path is at the level below the package running the test.

Running an individual test file from the extension with the default settings gives the following output:

[INFO 6:27:48 PM] Tests run start
[INFO 6:27:48 PM] [Workspace "package-name] Run tests from workspace
[INFO 6:27:48 PM] [Execute Vitest] c:/source/project-root/Folder With - Space/FrontendPackages/packages/package-name/node_modules/.bin/vitest.cmd /source/project-root/Folder With - Space/FrontendPackages/packages/package-name/src/__tests__/testFile.spec.ts
[INFO 6:27:48 PM] Start api process at port 49706
[INFO 6:27:48 PM] [RUN] c:/source/project-root/Folder With - Space/FrontendPackages/packages/package-name/node_modules/.bin/vitest.cmd /source/project-root/Folder With - Space/FrontendPackages/packages/package-name/src/__tests__/testFile.spec.ts
[INFO 6:27:48 PM] [RUN.cwd] c:/source/project-root/Folder With - Space/FrontendPackages/packages/package-name
[INFO 6:27:48 PM] WS Close
[Error 6:27:48 PM] Process exited with code 1
[INFO 6:27:48 PM] 'c:/source/project-root/Folder' is not recognized as an internal or external command,

operable program or batch file.

[INFO 6:27:49 PM] RECONNECT
[INFO 6:27:49 PM] WS Close

Environment:

  • OS: Windows 10
  • VS Code version: 1.75.1
  • Package manager: pnpm v7.27.0
  • Vitest version: 0.28.3
  • Vitest VS Code extension version: 0.2.39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

3 participants