WhitewaterFoundry / Fedora-Remix-for-WSL

Fedora Remix for Windows Subsystem for Linux.
Other
697 stars 51 forks source link

Errors in terminal when opening terminal in Visual Studio Code #142

Open ghost opened 2 years ago

ghost commented 2 years ago

Describe the bug Errors in terminal when opening terminal in Visual Studio Code

To Reproduce Steps to reproduce the behavior:

  1. Using Windows 10 and WSL2
  2. Open Visual Studio Code from terminal with code (e.g. code .)
  3. Vscode server for WSL automatically installs if not previously installed
  4. Open the terminal in WSL and get this error:
    bash: which: line 1: syntax error: unexpected end of file
    bash: error importing function definition for `which'
    /usr/bin/sh: which: line 1: syntax error: unexpected end of file
    /usr/bin/sh: error importing function definition for `which'
    /usr/bin/sh: which: line 1: syntax error: unexpected end of file
    /usr/bin/sh: error importing function definition for `which'
    /usr/bin/sh: which: line 1: syntax error: unexpected end of file
    /usr/bin/sh: error importing function definition for `which'

Expected behavior There should not be any error, just the shell prompt.

Screenshots image

Additional context This does not happen with Ubuntu for WSL installed on the same system.

Basic Troubleshooting Checklist

[x] I have searched Google for the error message. [x] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled. [x] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues. [x] I have searched the WLinux issues page: https://github.com/WhitewaterFoundry/WLinux/issues. [x] I have reset WLinux: Settings->Apps->Apps & features->WLinux->Advanced Options->Reset. [x] I have disabled and re-enabled WSL in Windows Features. [x] I have run Windows 10 updates and restarted.

What other troubleshooting have you attempted?

Uninstalling and reinstalling Fedora Remix for WSL

WLinux Version

Find: Settings->Apps->Apps & features->WLinux->Advanced Options->Version. 35.12.4.0

Windows Build

Run 'systeminfo | findstr /C:"OS"' in Command Prompt and insert here: OS Name: Microsoft Windows 10 Pro OS Version: 10.0.19043 N/A Build 19043

For help on retrieving: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#check-your-build-number

crramirez commented 2 years ago

Hello @kangzhiz,

Thanks for reporting we are going to take a look.

Regards, Carlos

spectrapulse commented 1 year ago

Can reproduce this issue on my system with the msstore version. image

Tried the same as above. Only difference here is that I'm running on W11. Output of systeminfo | findstr /C:"OS":

OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000
crramirez commented 1 year ago

Hello,

I cannot reproduce the error. I've tried every step with a clean install of Fedora 35 and 36 and I don't see the error.

Could you please give me more context? What more do you have installed there?

Regards, Carlos

brydr commented 1 month ago

This was a VS Code issue which has since been fixed https://github.com/microsoft/vscode/issues/163564