vscode-extension-tester
vscode-extension-tester copied to clipboard
[🚫 Bug] running extester in git bash on windows crashes during unpack
Describe the bug
On windows we run: npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
inside of a bash window (both in github actions to be able to share the step with linux & osx, and to use git-bash).
But it then fails with:
Downloading VS Code: 1.75.1 / stable
Downloading VS Code from: https://update.code.visualstudio.com/1.75.1/win32-x64-archive/stable
progress: 0/157 (0%)
progress: 131302436/131302436 (100%)
Downloaded VS Code into D:\a\rascal-language-servers\rascal-language-servers\rascal-vscode-extension\uitests\stable.zip
Unpacking VS Code into D:\a\rascal-language-servers\rascal-language-servers\rascal-vscode-extension\uitests
Error: Command failed: cd vscodesrxCRj && tar -xvf D:\a\rascal-language-servers\rascal-language-servers\rascal-vscode-extension\uitests\stable.zip
tar: Cannot connect to D: resolve failed
It downloads a zip, and then tries to use tar
to extract the zip.
Steps to reproduce
1. start (git) bash on windows
2. run `npx extest setup-tests`
3. see it fail
If you run it in powershell, it succeeds
Logs
Downloading VS Code: 1.75.1 / stable
Downloading VS Code from: https://update.code.visualstudio.com/1.75.1/win32-x64-archive/stable
progress: 0/157 (0%)
progress: 131302436/131302436 (100%)
Downloaded VS Code into D:\a\rascal-language-servers\rascal-language-servers\rascal-vscode-extension\uitests\stable.zip
Unpacking VS Code into D:\a\rascal-language-servers\rascal-language-servers\rascal-vscode-extension\uitests
Error: Command failed: cd vscodesrxCRj && tar -xvf D:\a\rascal-language-servers\rascal-language-servers\rascal-vscode-extension\uitests\stable.zip
tar: Cannot connect to D: resolve failed
Operating System
Windows 11
Visual Studio Code
1.87.2
vscode-extension-tester
7.3.0
NodeJS
18.19.1
npm
10.2.4
I saw the same issue on Windows that I have to use sed and replace tar by other tools that can unpack (7z, etc.) the archive
ps: workaround is to run setup in Powershell/cmd, and then run the tests in offline mode.
The may be that to use tar
in command prompt on Windows you need to open console as a Administrator. That is not needed in powershell which seems to be the main difference here
I think the problem is that tar
shouldn't be used to unpack zip
files. The code seems to pickup linux environment due to running in bash (which is not that unreasonable of an assumption), and when running inside powershell, it detects: hey this is windows, so let me unzip a zip file instead of trying to use tar to unzip a file.
So: it downloaded a zip because it's windows, but then later decides to use tar because it's not sure it's windows anymore.