8000 add ARDUINO_DIRECTORIES_DATA environnement variable as packagePath · microsoft/vscode-arduino@8b77fbd · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 8b77fbd

Browse files
committed
add ARDUINO_DIRECTORIES_DATA environnement variable as packagePath
as describe here https://arduino.github.io/arduino-cli/0.28/configuration/#environment-variables add the ARDUINO_DIRECTORIES_DATA to define package directory
1 parent 0062c73 commit 8b77fbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/arduino/arduinoSettings.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,11 @@ export class ArduinoSettings implements IArduinoSettings {
214214
this._packagePath = path.join(this._arduinoPath, "portable");
215215
} else if (util.fileExistsSync(path.join(this._arduinoPath, "AppxManifest.xml"))) {
216216
this._packagePath = path.join(folder, "ArduinoData");
217+
} else if (process.env.hasOwnProperty('ARDUINO_DIRECTORIES_DATA')) {
218+
this._packagePath = process.env.ARDUINO_DIRECTORIES_DATA
217219
} else {
218220
this._packagePath = path.join(process.env.LOCALAPPDATA, "Arduino15");
219221
}
220-
221222
if (this.preferences.get("sketchbook.path")) {
222223
if (util.directoryExistsSync(path.join(this._arduinoPath, "portable"))) {
223224
this._sketchbookPath = path.join(this._arduinoPath, "portable", this.preferences.get("sketchbook.path"));

0 commit comments

Comments
 (0)
0