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

Test resolved variables for custom execution tasks #105736

Closed
3 tasks done
alexr00 opened this issue Aug 31, 2020 · 0 comments
Closed
3 tasks done

Test resolved variables for custom execution tasks #105736

alexr00 opened this issue Aug 31, 2020 · 0 comments

Comments

@alexr00
Copy link
Member

alexr00 commented Aug 31, 2020

Refs: #81007

Complexity: 4

Create Issue


You can start from the custom execution task sample. The callback you need to modify is here:
https://github.com/microsoft/vscode-extension-samples/blob/aa174fe79657d9b69cdb6cd2c6306c50c49b512d/task-provider-sample/src/customTaskProvider.ts#L73

Variables in custom execution tasks are now resolved and passed back to the task callback:

constructor(callback: (resolvedDefinition: TaskDefinition) => Thenable<Pseudoterminal>);

To verify, you'll need to change the callback in the custom execution task sample to use the parameter in the API. Verify that if there are variables in the tasks.json file for a custombuildscript task that they are resolved and passed into the task callback when the task is run. All variables should be resolved (standard ones, input, and command). Variable docs. If a variable is used twice in the task and it requires input, it should only be prompted for once. Example of a custombuildscript task in tasks.json with some variables:

		{
			"type": "custombuildscript",
			"flavor": "${input:chooseNumber}",
			"flags": ["${workspaceFolder}"],
			"problemMatcher": [],
			"label": "custombuildscript: 64 "
		}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants