-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Error launching custom tasks (cannot read property 'cwd' of undefined) #9743
Comments
I guess one of the reasons this problem appeared is that we don't have proper typing of the
We really should add all known fields with proper typing in any types where they apply. Generally, I would refactor those types to have a fixed set of properties like so:
This way, we would notice if we're adding a property somewhere but leave it out in related types. |
@kenneth-marut-work do you have time to fix this in the short term? You're probably most familiar with that particular code. |
Sure I'll try to get to it today 👍 |
@tsmaeder, I agree with your suggestion. We have the |
This can also be reproduced using the vscode sample: Run the task: Command Palette -> Tasks: run Task -> custombuildscript: 32 watch incremental |
Fixes eclipse-theia#9743 by improving check for taskConfig.options.cwd from eclipse-theia#9695. Also ensures that lastCwd field on terminal-widget is never undefined as to ensure get cwd() will always return a URI. Signed-off-by: Kenneth Marut <[email protected]>
Fixes #9743 by improving check for taskConfig.options.cwd from #9695. Also ensures that lastCwd field on terminal-widget is never undefined as to ensure get cwd() will always return a URI. Signed-off-by: Kenneth Marut <[email protected]>
Fixes eclipse-theia#9743 by improving check for taskConfig.options.cwd from eclipse-theia#9695. Also ensures that lastCwd field on terminal-widget is never undefined as to ensure get cwd() will always return a URI. Signed-off-by: Kenneth Marut <[email protected]>
Bug Description:
When launching tasks with custom executions (for example from the gradle VS Code extensions), we get errors saying
I was able to trace the problem to this PR:
https://github.com/eclipse-theia/theia/pull/9695/files#diff-6268a7212c6dfa3764fd2c66d3acfd23d8920a9264a28c1ec4a72210121bf96cR199
The problem is that taskConfig.options is not mandatory.
Steps to Reproduce:
Additional Information
The text was updated successfully, but these errors were encountered: