-
Notifications
You must be signed in to change notification settings - Fork 141
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
VSCode installed, but winget can't execute code --version
#720
Comments
What is the output of |
seems to be the most recent version |
Does topgrade expect a special PATH variable for Mine is a user variable that points to |
No
From the log, Topgrade has successfully found the code binary, I have no idea why it didn't work in the Topgrade code... |
Interesting, perhaps the Rust |
No clue, sorry, I don't have any experience with rust |
I got exactly the same issue, no matter whether I run it from powershell or from cmd. Additional Details
Verbose Output (topgrade -v)
|
I have the exact same issue on: VSCode Version 1.87.1 Topgrade Version 14.0.1 The additional information I can perhaps provide is that the issues started with topgrade 14.* without any changes to my setup. The issue also occurs on a second machine of mine which is configured quite differently to the one I'm posting this from. I have redownloaded Topgrade 13.0.0 and |
Thanks for this info! My thought on this issue is that it should be something specific to Windows, I have no idea why we can not execute How did you guys get your VSCode installed, maybe I will set up a Windows machine to give it a test. |
On both machines VSCode has been installed through chocolatey but the installation path is the default one. Unlike scoop or something no shims seem to be created, just the official installer downloaded and executed resulting in:
One observation is that this is a batch script, not an executable with the contents of:
But this doesn't explain why Update: I checked the source code between v13 and v14 and apparently the difference is that in v13 there was no attempt to call |
Right, this version check was introduced in v14.x.x Thanks for the info, I will try to give it a test. |
Hello. I think it may be related to rust-lang/rust#37519 |
Thanks for bringing this up! I will take a closer look this weekend |
Ok, I am able to reproduce this issue in my Windows VM:
PS C:\Users\steve\Desktop\rust> get-command code
CommandType Name Version Source
----------- ---- ------- ------
Application code.cmd 0.0.0.0 C:\Users\steve\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd
PS C:\Users\steve\Desktop\rust> get-content 'C:\Users\steve\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd'
@echo off
setlocal
set VSCODE_DEV=
set ELECTRON_RUN_AS_NODE=1
"%~dp0..\Code.exe" "%~dp0..\resources\app\out\cli.js" %*
endlocal
PS C:\Users\steve\Desktop\rust> Using |
Erroneous Behavior
Expected Behavior
program found
Steps to reproduce
run
topgrade
in powershell on windows 11Possible Cause (Optional)
I can only say that there's no differnce if I'm running topgrade in administrative shell or not.
Problem persists without calling from topgrade
Did you run topgrade through
Remote Execution
Configuration file (Optional)
Additional Details
Operation System/Version
Windows 11 Home Version 10.0.22631 Build 22631
Installation
winget
Topgrade version (
topgrade -V
)14.0.1
Verbose Output (
topgrade -v
)The text was updated successfully, but these errors were encountered: