microsoft / microsoft/vscode-cmake-tools
Setting PATH In "cmake.environment" Causes ENOENT Failures
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
Type: Bug
Settings.json:
```
"cmake.environment": {
"PATH": "/home//riscv32-esp-elf/bin/:/usr/bin/",
...
```
Select kit:
```
[driver] Switching to kit: GCC Espressif RISCV
[proc] Executing command: /home//riscv32-esp-elf/bin/riscv32-esp-elf-gcc -v
```
Configure:
```
...
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: /home//build
[proc] The command: riscv32-esp-elf-gcc -v failed with error: Error: spawn riscv32-esp-elf-gcc ENOENT
[proc] The command: riscv32-esp-elf-g++ -v failed with error: Error: spawn riscv32-esp-elf-g++ ENOENT
```
But if I comment out that `PATH`, and add it to the `.kit`:
```
...
"environmentVariables": {
"PATH": "/home//riscv32-esp-elf/bin/:/usr/bin/"
}
```
... then re-select that kit (so the field gets read), configure, it completes fine:
```
...
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: /home//build
```
Extension version: 1.12.27
VS Code version: Code - OSS 1.72.0 (c4722f1bb292284e0437eb7547808a5788fe6430, 2022-09-02T06:52:06.316Z)
OS version: Linux x64 6.0.1-dirty
Modes:
Sandboxed: No
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz (4 x 3392)|
|GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off|
|Load (avg)|3, 2, 2|
|Memory (System)|7.23GB (0.90GB free)|
|Process Argv|--ms-enable-electron-run-as-node|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|plasma|
|XDG_CURRENT_DESKTOP|KDE|
|XDG_SESSION_DESKTOP|KDE|
|XDG_SESSION_TYPE|x11|
Contributor guide
Assessment
This issue has not been assessed yet.