Closed jdai closed 6 months ago
Thanks for the submission! But if I'm reading this right, you're trying to run PowerShell ISE and then start vscode from ISE? This all works just fine from a cmd or pwsh command prompt so if it doesn't work in ISE there's not much we can do about this in terms of the extension, PowerShell ISE is deprecated.
I have my git configured to use vscode and that is configured for code --wait and works just fine in cmd, bash, and pwsh
I was able to reproduce in ISE, this has to do with how the custom ISE host is probably handling the interactive prompt of Launch vscode [y/n]
. Unfortunately that's nothing we can fix here, we recommend you use VSCode with the PowerShell extension, it is the currently supported official way to author PowerShell. This would have to be fixed in ISE and that's deprecated so unlikely unless something was fixed in git directly to handle this maybe it's unlikely.
As such I'm going to close this as wontfix
. Sorry, but there's nothing we can do to fix this, it's not in the scope of the vscode extension.
thanks for fast review. I am involved in Microsoft projects and we still use PS ISE. PS has one problem - ninja problem as I filed here: https://github.com/ninja-build/ninja/issues/2379
Sorry to hear that, as a workaround you can have a normal powershell window next to your ISE and whenever you need to do a diff, run the command there rather than ISE, should work fine. If there's a git config setting to disable that prompt, that would probably work too.
Prerequisites
Summary
when use "git difftool", on PS it pops up vscode and works well, or PS ISE it doesn't pop up vscode and stuck.
this case might similar as: https://github.com/PowerShell/vscode-powershell/issues/4012
OS Name Microsoft Windows 11 Enterprise Version 10.0.22631 Build 22631
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
1)start powershell ISE 2)setup vscode/git env, touch one for file that is in git repo(say file1.txt) then edit .gitconfig by: PS> config --global -e ......#add these lines below: [diff] tool = vscode [difftool "vscode"] cmd = code --wait --diff $LOCAL $REMOTE [merge] tool = vscode [mergetool "vscode"] cmd = code --wait $MERGED 3)run: PS E:\repos\king> git difftool
Viewing (1/1): 'tools/pwsh/modules/Build-Utils.psm1' git difftool PS E:\repos\king> git difftool then stuck.
On PS(not ISE), same command will lead to: PS E:\repos\king> git difftool
Viewing (1/1): 'tools/pwsh/modules/Build-Utils.psm1' Launch 'vscode' [Y/n]? type S and it will continue to pop up vscode window. both PS and PS ISE run as admin.
Visuals
No response
Logs
No response