aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r--editors/code/src/commands/cargo_watch.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/editors/code/src/commands/cargo_watch.ts b/editors/code/src/commands/cargo_watch.ts
index 748be535c..ac62bdd48 100644
--- a/editors/code/src/commands/cargo_watch.ts
+++ b/editors/code/src/commands/cargo_watch.ts
@@ -111,8 +111,13 @@ export class CargoWatchProvider implements vscode.Disposable {
111 }, 111 },
112 ); 112 );
113 113
114 if (!this.cargoProcess) {
115 vscode.window.showErrorMessage('Cargo Watch failed to start');
116 return;
117 }
118
114 const stdoutData = new LineBuffer(); 119 const stdoutData = new LineBuffer();
115 this.cargoProcess.stdout.on('data', (s: string) => { 120 this.cargoProcess.stdout?.on('data', (s: string) => {
116 stdoutData.processOutput(s, line => { 121 stdoutData.processOutput(s, line => {
117 this.logInfo(line); 122 this.logInfo(line);
118 try { 123 try {
@@ -124,7 +129,7 @@ export class CargoWatchProvider implements vscode.Disposable {
124 }); 129 });
125 130
126 const stderrData = new LineBuffer(); 131 const stderrData = new LineBuffer();
127 this.cargoProcess.stderr.on('data', (s: string) => { 132 this.cargoProcess.stderr?.on('data', (s: string) => {
128 stderrData.processOutput(s, line => { 133 stderrData.processOutput(s, line => {
129 this.logError('Error on cargo-watch : {\n' + line + '}\n'); 134 this.logError('Error on cargo-watch : {\n' + line + '}\n');
130 }); 135 });