From 184fb032cb3b0b20ba07a9818f793f0771a518b8 Mon Sep 17 00:00:00 2001 From: Gareth Emslie Date: Thu, 15 Feb 2018 14:38:27 +0100 Subject: [PATCH] Workaround for internal change with workspace.findfiles --- src/deviceContext.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/deviceContext.ts b/src/deviceContext.ts index 400708c0..aecf4e51 100644 --- a/src/deviceContext.ts +++ b/src/deviceContext.ts @@ -148,6 +148,22 @@ export class DeviceContext implements IDeviceContext, vscode.Disposable { this._debugger = null; this._onDidChange.fire(); } + return this; + }, (reason) => { + // Workaround for change in API. + // vscode.workspace.findFiles() for some reason now throws an error ehn path does not exist + // vscode.window.showErrorMessage(reason.toString()); + // Logger.notifyUserError("arduinoFileUnhandleError", new Error(reason.toString())); + + // Workaround for change in API, populate required props for arduino.json + this._port = null; + this._board = null; + this._sketch = null; + this._configuration = null; + this._output = null; + this._debugger = null; + this._onDidChange.fire(); + return this; }); }