-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Incorrect virtualenv activate script executed | Nushell #22036
Comments
I will also add that this has been working up until the most recent VSCode update, although it does seem that the extension was also updated yesterday. Will try to find any more relevant changes which may have caused this bug. |
Rolling back to |
Found some additional info in the output which is seeming to suggest that my current shell is
|
Okay I think I've figured it out. The following line is looking for the shell being named Mine was called Nushell (via the official nushell extension): Changing to However, I will say that I think we should be using both |
@alex-way Thanks for the looking into it.
The code you pointed to looks into the path of the shell, not the name. It checks whether that path of shells ends with "nu" or "NU" or any case insensitive comparision. In case of Nushell, the path of the shell reported to us by In case of Nu, the path to shell is actually the path to |
@karrtikr Could we use a case-insensitive replace? const basePath = shellPath.replace(/\.exe$/i, ''); Since I found my Nushell profile is giving a |
Sure, if you send up a PR for it we would be happy to take it. |
Use case-insensitive regex to remove `.exe` extension. microsoft#22036 (comment)
Use case-insensitive regex to remove `.exe` extension. microsoft#22036 (comment)
Use case-insensitive regex to remove `.exe` extension. See: #22036 (comment)
Type: Bug
Behaviour
Expected vs. Actual
When opening a new terminal window (Nushell) the incorrect activate script is being executed for my virtualenvironment:
& C:/Users/WayA/AppData/Local/pypoetry/Cache/virtualenvs/cloud-billing-VTFyPfP7-py3.11/Scripts/Activate.ps1
Rather than:
overlay use C:/Users/WayA/AppData/Local/pypoetry/Cache/virtualenvs/cloud-billing-VTFyPfP7-py3.11/Scripts/activate.nu
Steps to reproduce:
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2023.16.0
VS Code version: Code 1.82.2 (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:55:25.390Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
The text was updated successfully, but these errors were encountered: