inshellisense icon indicating copy to clipboard operation
inshellisense copied to clipboard

'Open Powershell window here' functionality breaks when script launches at start of session

Open ivomfrazao opened this issue 1 year ago • 0 comments

Describe the bug When opening a shell using the context-menu command of "open here", the session should open with its current directory being the folder where I clicked that command. However, it opens at the System32 folder. https://github.com/user-attachments/assets/91f4066f-d0c7-4c73-9206-95527f18af04

When using the same shell, but using the "powershell" command at the navigation bar, it works fine. https://github.com/user-attachments/assets/0349f80d-6b88-4009-af6f-f37dc3e9f6df

To Reproduce Steps to reproduce the behavior:

  1. Have the plugin start at the start of session of Powershell using the command provided is init powershell | Add-Content $profile
  2. In a folder, Shift + right-click anywhere in the folder.
  3. In the context menu that opens, click 'Open Powershell window here'

Expected behavior The Powershell session opens with its current directory being the folder where the command was launched from.

Environment

  • OS: Windows 10 Enterprise 22H2, OS build 19045.5247
  • Output of is --version: 0.0.1-rc.19
  • Nodejs Version: v22.12.0
  • Shell: PowerShell
  • Shell Version: 5.1.19041.5247

ivomfrazao avatar Jan 07 '25 18:01 ivomfrazao