microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.46k stars 29.36k forks source link

Variables not expanding when the terminal autoruns on startup (Win10 → WSL) #92799

Closed 747 closed 3 years ago

747 commented 4 years ago

Issue Type: Bug

  1. set up your workspace JSON as follows:

    {
    "folders": [
        {
            "path": "."
        }
    ],
    "settings": {
        "terminal.integrated.env.linux": {
            "PATH": "${workspaceFolder}:${env:PATH}"
        }
    }
    }
  2. close VSCode while in the workspace leaving the integrated terminal open (so that it restarts automatically at the next time)

  3. launch VSCode again

  4. the terminal pops up and says:

    コマンド 'lesspipe' は以下の場所で利用できます
    * /bin/lesspipe
    * /usr/bin/lesspipe
    '/bin:/usr/bin'がPATH環境変数に含まれていないためコマンドを特定できませんでした。
    lesspipe: コマンドが見つかりません
    コマンド 'dircolors' は '/usr/bin/dircolors' で利用できます
    '/usr/bin'がPATH環境変数に含まれていないためコマンドを特定できませんでした。
    dircolors: コマンドが見つかりません

    (it complains in Japanese about /bin:/usr/bin not included in $PATH)

    $ echo $PATH
    ${workspaceFolder}:${env:PATH}
  5. open a new terminal and it correctly sources PATH

    $ echo $PATH
    /mnt/my/Workspace/Folder:/home/me/.vscode-server/bin/blahblah...

VS Code version: Code 1.43.0 (78a4c91400152c0f27ba4d363eb56d2835f9903a, 2020-03-09T19:47:57.235Z) OS version: Windows_NT x64 10.0.18363 Remote OS version: Linux x64 4.4.0-18362-Microsoft

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 7 1700 Eight-Core Processor (16 x 2994)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.95GB (21.90GB free)| |Process Argv|| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu-18.04| |OS|Linux x64 4.4.0-18362-Microsoft| |CPUs|AMD Ryzen 7 1700 Eight-Core Processor (16 x 3000)| |Memory (System)|31.95GB (21.91GB free)| |VM|0%|
Extensions (40) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|2.0.5 vsc-material-theme|Equ|32.5.0 vsc-material-theme-icons|equ|1.1.4 ace|eva|0.0.1 auto-close-tag|for|0.5.6 textile|idl|0.1.5 sdlang|Lau|0.1.2 procfile-support|log|0.0.1 vscode-language-pack-ja|MS-|1.43.6 remote-wsl|ms-|0.42.3 material-icon-theme|PKi|4.0.1 ayu|tea|0.18.0 vscode-ruby|win|0.27.0 material-theme|zhu|3.2.3 insert-unicode|bru|0.7.1 better-toml|bun|0.3.2 githistory|don|0.6.3 EditorConfig|Edi|0.14.4 crystal-lang|fau|0.3.14 auto-close-tag|for|0.5.6 auto-complete-tag|for|0.1.0 auto-rename-tag|for|0.1.1 code-runner|for|0.9.17 sass-lint|gle|1.0.6 todo-tree|Gru|0.0.169 align-by-regex|jan|1.0.4 asciidoctor-vscode|joa|2.7.13 nim|kos|0.6.4 formate|Mik|1.1.4 vscode-language-pack-ja|MS-|1.43.6 python|ms-|2020.2.64397 cpptools|ms-|0.26.3 trailingwhitespacehighlighter|paj|0.0.2 ruby|reb|0.27.0 rust|rus|0.7.0 crates|ser|0.4.9 vscode-table-formatter|shu|1.2.1 sass-indented|syl|1.7.5 vscode-ruby|win|0.27.0 better-align|wwm|1.1.6 (4 theme extensions excluded)
Tyriar commented 4 years ago

Same root cause as https://github.com/microsoft/vscode/issues/81231 I believe.