diff --git a/src/arduino/arduinoSettings.ts b/src/arduino/arduinoSettings.ts index 60e8ebea..9a2f7720 100644 --- a/src/arduino/arduinoSettings.ts +++ b/src/arduino/arduinoSettings.ts @@ -214,10 +214,11 @@ export class ArduinoSettings implements IArduinoSettings { this._packagePath = path.join(this._arduinoPath, "portable"); } else if (util.fileExistsSync(path.join(this._arduinoPath, "AppxManifest.xml"))) { this._packagePath = path.join(folder, "ArduinoData"); + } else if (process.env.hasOwnProperty('ARDUINO_DIRECTORIES_DATA')) { + this._packagePath = process.env.ARDUINO_DIRECTORIES_DATA } else { this._packagePath = path.join(process.env.LOCALAPPDATA, "Arduino15"); } - if (this.preferences.get("sketchbook.path")) { if (util.directoryExistsSync(path.join(this._arduinoPath, "portable"))) { this._sketchbookPath = path.join(this._arduinoPath, "portable", this.preferences.get("sketchbook.path"));