Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of input from launch.json inside tasks.json when used as preLaunchTask #201785

Closed
ThaDaVos opened this issue Jan 4, 2024 · 2 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@ThaDaVos
Copy link

ThaDaVos commented Jan 4, 2024

It's seems to be a re-open of this one: #95158

But I expected that if one uses the same input (same ID) in both the launch.json and tasks.json that I would only get asked once for the input and it gets used in both files, but I am getting asked twice, which may lead to a misconfiguration if choosing a different option - the used inputs is below:

............
  "inputs": [
    {
      "id": "BuildConfiguration",
      "description": "The used Build Configuration: Debug or Release",
      "default": "Debug",
      "options": ["Debug", "Release"],
      "type": "pickString"
    }
  ],
............

So the feature I would like, is that the input, as long as the ID is the same, gets re-used - or a way to pass it through manually, like a preLaunchTaskInputs - to define each input one wants to supply, maybe as follows:

............
"preLaunchTaskInputs": {
  "BuildConfiguration": "${input:BuildConfiguration}"
}
............

Above would allow fixed set values or re-using inputs, even with different names, to be passed to the task - it's also the most flexible solution

@ThaDaVos
Copy link
Author

ThaDaVos commented Jan 4, 2024

Seems I haven't searched good enough, or with the correct arguments - but this old issue seems to be almost the same:
#27157

@roblourens
Copy link
Member

I think #27157 would be the right approach

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 4, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants