tomrijndorp / vscode-finditfaster

Find it, but faster! Fast file search for VS Code.
MIT License
257 stars 25 forks source link

[Windows] Uses default terminal profile #76

Open jacovanc opened 3 months ago

jacovanc commented 3 months ago

I use Bash as my default terminal in vscode. Hitting CTRL-Shift-J or U tries to run it in bash, which doesn't seem to work. If I change the default to powershell it works as expected.

Ideally it would open powershell over the default if it is not expected to work on bash for windows.

mdmelin commented 3 months ago

I'm having the same error. Can this be handled on the FindItFaster end? If so, I'm happy to take a crack at it if someone can point me to where a terminal is requested from VSCode.

ethansnow2012 commented 3 months ago

Same here. But I can not get it to work even after setting powershell as default.

Error message:

Failed to run checks before starting extension. Maybe this is helpful: Error: Command failed: powershell 
....
...

c:\Users\ethan\.vscode\extensions\tomrijndorp.find-it-faster-0.0.31\f ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
subinoybiswas commented 3 months ago

Tried fixing this issue in my fork, the logic works, made a forceBashWindows setting the user can toggle, but having difficulties in getting that state in the code, would be great if somebody can test it. My Fork

subinoybiswas commented 3 months ago

Tried fixing this issue in my fork, the logic works, made a forceBashWindows setting the user can toggle, but having difficulties in getting that state in the code, would be great if somebody can test it. My Fork

Giving the changes here, as Prettier made the Diff wild;) const localScript = (x: string) => CFG.forceBashOnWindows && x !== "flight_check" ? vscode.Uri.file( powershell "${ path.join(context.extensionPath, commands.findFiles.script) + ".ps1" }" ) : vscode.Uri.file( path.join(context.extensionPath, x) + (os.platform() === "win32" ? ".ps1" : ".sh") );