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

Commit d712a94

Browse files
elektronikworkshopadiazulay
authored andcommitted
Don't use hard coded paths when possible.
1 parent 6c1fe68 commit d712a94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common/workspace.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import * as fs from "fs";
55
import * as path from "path";
66
import * as vscode from "vscode";
7+
import { ARDUINO_CONFIG_FILE } from "./constants";
78

89
export class ArduinoWorkspace {
910
static get rootPath(): string|undefined {
@@ -14,7 +15,7 @@ export class ArduinoWorkspace {
1415

1516
for (const workspaceFolder of workspaceFolders) {
1617
const workspaceFolderPath = workspaceFolder.uri.fsPath;
17-
const arduinoConfigPath = path.join(workspaceFolderPath, ".vscode", "arduino.json");
18+
const arduinoConfigPath = path.join(workspaceFolderPath, ARDUINO_CONFIG_FILE);
1819
if (fs.existsSync(arduinoConfigPath)) {
1920
return workspaceFolderPath;
2021
}

0 commit comments

Comments
 (0)