-
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
Fix converting of task with custom type #5591
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -651,7 +651,8 @@ export function toTask(taskDto: TaskDto): theia.Task { | |
result.execution = getProcessExecution(taskDto as ProcessTaskDto); | ||
} | ||
|
||
if (taskType === 'shell') { | ||
const execution = { command, args, options }; | ||
if (taskType === 'shell' || types.ShellExecution.is(execution)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder whether we need similar check for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think - no, the reasons I wrote here. But let me know if I should to reconsider that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, please merge There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, thanks for testing changes and review! |
||
result.execution = getShellExecution(taskDto as ProcessTaskDto); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wondering: do we need to use
types.ProcessExecution.is(execution)
in the if-statement in line 650, since you added a "customType" ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you, I'll review it today
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elaihau I updated the PR, please review.
about your question - we use
types.ProcessExecution.is(execution)
when we do converting fromtheia.Task
toTaskDto
, but we don't need the same when we converting fromTaskDto
totheia.Task
. For this case we use check by type only.It's because at converting
theia.Task
of 'process' type 'process' filed is converted to 'command' filed ofTaskDto
. ProcessTaskRunner recognizes task by type and expects command field at the moment.