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

Fix running a task when 'cwd' is not provided #8949

Merged
merged 1 commit into from
Jan 18, 2021

Conversation

alvsan09
Copy link
Contributor

@alvsan09 alvsan09 commented Jan 14, 2021

Removing a check that seems to be a change leftover from change [2]

The issue was triggered by launching a debug session which includes a
"preLaunchTask" referencing a build task.

The issue happened even if the "cwd" option was present in the tasks.json file

The check triggering the error was removed as the 'cwd' options should not be
mandatory see options under [3].

[1] #8930
[2] #5024 (comment)
[3] https://code.visualstudio.com/docs/editor/tasks#_custom-tasks

Signed-off-by: Alvaro Sanchez-Leon alvaro.sanchez-leon@ericsson.com

What it does

The check triggering the error was removed as the 'cwd' options should not be
mandatory see options under [3].

[1] #8930
[2] #5024 (comment)
[3] https://code.visualstudio.com/docs/editor/tasks#_custom-tasks

How to test

The steps to reproduce the issue and test the fix manually are under issue:
#8930

In addition the @theia/tasks and @theia/core tests were executed successfully

Review checklist

Reminder for reviewers

The issue was triggered by launching a debug session which includes a
"preLaunchTask" referencing a build task.

The issue happened even if the "cwd" option was present in the tasks.json file

The check triggering the error was removed as the 'cwd' options should not be
mandatory see 'options' under [3] as well as comment [2].

[1] eclipse-theia#8930
[2] eclipse-theia#5024 (comment)
[3] https://code.visualstudio.com/docs/editor/tasks#_custom-tasks

Signed-off-by: Alvaro Sanchez-Leon <alvaro.sanchez-leon@ericsson.com>
@vince-fugnitto vince-fugnitto added bug bugs found in the application debug issues that related to debug functionality tasks issues related to the task system labels Jan 14, 2021
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for investigating the issue, and providing a solution 👍 I confirmed that the changes work successfully when using a preLaunchTask and postDebugTask.

I believe it is the proper fix since:

  • cwd has a default value (${workspaceFolder}), and is not mandatory in the schema definitions of vscode.
  • it seems to be a leftover as you mentioned clearly in the description.

Copy link
Contributor

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look reasonable to me.
Tested using steps to reproduce section of #8930 - the PR fixes the issue for me.
thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application debug issues that related to debug functionality tasks issues related to the task system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants