-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Description
Following the instructions for setting "terminal.integrated.shellArgs.windows" given at https://code.visualstudio.com/docs/editor/integrated-terminal#_can-i-use-cygwins-shell-with-the-terminal-on-windows
causes run build task using Cygwin to fail with:
cygpath: option requires an argument -- c
Try `cygpath --help' for more information.
A task window opens and shows a bash prompt. make runs correctly at that
prompt.
run build task correctly runs Cygwin make after removing
"terminal.integrated.shellArgs.windows".
Using Cygwin Shell says:
add the following settings to your settings.json file:
"terminal.integrated.shell.windows": "C:\\Cygwin\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": ["/bin/xhere", "/bin/bash"]
xhere takes one or two arguments: a program to start and an optional
directory to make the cwd before starting the given program.
This problem occurs because, when executing run build task, VS Code
passes three arguments: the Cygwin path name of the Windows path given in
"terminal.integrated.shell.windows", a literal -c, and , as one
argument, the value of "command" and the "args" array from tasks.json. For
example, when running all from this tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "all",
"type": "shell",
"command": "C:/cygwin64/bin/make.exe",
"args": [
"all"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
}
]
}
arg 1: /bin/bash
arg 2: -c
arg 3: C:/cygwin64/bin/make.exe all
It appears that VS Code changes the current work directory before starting
"terminal.integrated.shell.windows" which would make xhere unnecessary. If
that is so, the fix would be to change the text of
https://code.visualstudio.com/docs/editor/integrated-terminal#_can-i-use-cygwins-shell-with-the-terminal-on-windows
to say that "terminal.integrated.shellArgs.windows" need not be set,
along with a warning that it must not contain -l or --login as they
reset the cwd to the user's home directory.
Version: 1.35.1 (system setup)
Commit: c7d83e57cd18f18026a8162d042843bda1bcf21f
Date: 2019-06-12T14:30:02.622Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.16299
Problem occurs with all extensions disabled.
If I clear "Dev Tools Console" before run build task, it displays nothing
new after running run build task.
VS Code version: Code 1.35.1 (c7d83e5, 2019-06-12T14:30:02.622Z)
OS version: Windows_NT x64 10.0.16299
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2712) |
| GPU Status | 2d_canvas: enabled checker_imaging: disabled_off flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software rasterization: enabled surface_synchronization: enabled_on video_decode: enabled webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 15.88GB (8.22GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
Extensions (9)
| Extension | Author (truncated) | Version |
|---|---|---|
| spellright | ban | 3.0.38 |
| remote-containers | ms- | 0.59.0 |
| remote-ssh | ms- | 0.42.2 |
| remote-ssh-edit | ms- | 0.42.2 |
| remote-ssh-explorer | ms- | 0.42.2 |
| remote-wsl | ms- | 0.38.0 |
| vscode-remote-extensionpack | ms- | 0.15.0 |
| cpptools | ms- | 0.24.0-insiders |
| rewrap | stk | 1.9.1 |