-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove ProcessTaskRunner.findCommand, introduce process "started" event
In the long term goal of handling properly shell tasks (allowing the user to specify "abc && def" as the command), we need to get rid of the findCommand method in ProcessTaskRunner. Otherwise, it will always return that the binary "abc && def" can't be found. Even for non-shell tasks, it doesn't seem ideal to implement ourselves the logic of looking through PATH. It's better to leave that to the OS. Instead, we want to rely on the underlying thing we use to run processes (either node's child_process or node-pty) to return us an appropriate error code. With node's child_process, we can do it out-of-the-box. With node-pty, we use our own fork available at [1] which adds the necessary features. On error, the Process emits an onError event. For the non-error case, we need to know when the process has been successfully started, so we can inform the client that the task has been successfully started. To do this, I added an 'onStart' event on Process. [1] https://github.com/theia-ide/node-pty/tree/theia Change-Id: Ie2db8909610129842912d312872a48aef3de23a5 Signed-off-by: Simon Marchi <[email protected]>
- Loading branch information
Showing
15 changed files
with
225 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.