Skip to content

questionable "cwd" value in default build task #4761

@weinand

Description

@weinand

Type: General

Describe the bug

  • OS and Version: macOS 10.14.6
  • VS Code Version: Insiders
  • C/C++ Extension Version: 0.26.3

The default task.json contains a questionable value for the Current Working Directory (cwd):

            "options": {
                "cwd": "/usr/bin"
            }

It doesn't make much sense that the "build task" for C/C++ runs in /usr/bin because any output produced by gcc should not live there and typically results in access errors because /usr/bin is not writable for most users.

If a user uses the default build task as a starting point for modification of the file, she will always run into problems unless the bogus "/usr/bin" is changed.

To Reproduce

  • create folder "test"
  • open "test" in VS Code
  • create (empty) "hello.c"
  • open "hello.c"
  • press "F1"
  • type "task"
  • select the "Configure Default Build Task" action
  • select "C/C++: gcc build active"

Observe:
generated task.json has the "cwd": "/usr/bin".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServicefixedCheck the Milestone for the release in which the fix is or will be available.quick fixtasks/build/debugAn issue relating to tasks.json (e.g. build issues)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions