Skip to content

Commit 9d29588

Browse files
authored
Merge pull request #21 from arduino/per1234/fix-schemas-path
Set schemas path relative to executable
2 parents 991db89 + 71dd2ca commit 9d29588

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: configuration/configuration.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ func TargetPath() *paths.Path {
9999

100100
// SchemasPath returns the path to the folder containing the JSON schemas.
101101
func SchemasPath() *paths.Path {
102-
workingPath, _ := os.Getwd()
103-
return paths.New(workingPath)
102+
executablePath, err := os.Executable()
103+
if err != nil {
104+
panic(err)
105+
}
106+
return paths.New(executablePath).Parent()
104107
}

0 commit comments

Comments
 (0)