Saturday, April 27, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 3150  / 1 Year ago, sun, february 26, 2023, 3:40:06

I think this happened after I use RDP. Every time I write code . in the terminal it prompts:


To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the `code` command in a WSL terminal just as you would in a normal command prompt.
Do you want to continue anyway? [y/N] y
To no longer see this prompt, start Visual Studio Code with the environment variable DONT_PROMPT_WSL_INSTALL defined.

I tried uninstalling and installing VsCode but it didn't work. How can I stop seeing the prompt? How can I start VsCode with the environment variable DONT_PROMPT_WSL_INSTALL?


EDIT: None of the solutions below have worked but I removed and installed code and the code . works without the y/N prompt. But there is still the DONT_PROMPT_WSL_INSTALL: command not found at the top of the terminal.


Prompt is still in wsl


More From » command-line

 Answers
2

Henning already explained how to set the variable manually, but another option is to make code an alias and set the variable there. Just add this line to your ~/.bashrc file:


alias code='DONT_PROMPT_WSL_INSTALL=1 code'

This makes the command code actually run DONT_PROMPT_WSL_INSTALL=1 code which means it will be running with the variable set. Note that you need to open a new terminal so .bashrc is read, or manually source the file (. ~/.bashrc) for the changes to take effect.


[#369] Monday, February 27, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
istictroubli

Total Points: 306
Total Questions: 96
Total Answers: 114

Location: Sao Tome and Principe
Member since Wed, Jul 13, 2022
2 Years ago
istictroubli questions
Sun, Jun 5, 22, 14:23, 2 Years ago
Fri, Mar 31, 23, 06:07, 1 Year ago
Mon, Jan 23, 23, 16:45, 1 Year ago
Tue, Nov 16, 21, 09:20, 3 Years ago
;