File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 9
9
"os"
10
10
"os/exec"
11
11
"os/signal"
12
+ "os/user"
13
+ "path"
12
14
13
15
"github.com/arduino/arduino-language-server/ls"
14
16
"github.com/arduino/arduino-language-server/streams"
@@ -75,6 +77,15 @@ func main() {
75
77
log .Fatal ("ArduinoCLI daemon address and instance number must be set." )
76
78
}
77
79
} else {
80
+ if * cliConfigPath == "" {
81
+ if user , _ := user .Current (); user != nil {
82
+ candidate := path .Join (user .HomeDir , ".arduino15/arduino-cli.yaml" )
83
+ if _ , err := os .Stat (candidate ); err == nil {
84
+ * cliConfigPath = candidate
85
+ log .Printf ("ArduinoCLI config file found at %s\n " , candidate )
86
+ }
87
+ }
88
+ }
78
89
if * cliConfigPath == "" {
79
90
log .Fatal ("Path to ArduinoCLI config file must be set." )
80
91
}
You can’t perform that action at this time.
0 commit comments