File tree 1 file changed +5
-8
lines changed
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import (
21
21
"fmt"
22
22
"io/ioutil"
23
23
"os"
24
- "path/filepath"
25
24
26
25
"github.com/arduino/arduino-cli/output"
27
26
@@ -136,12 +135,6 @@ func initConfigs() {
136
135
commands .Config = conf
137
136
}
138
137
139
- // Navigate through folders
140
- pwd , err := filepath .Abs ("." )
141
- if err != nil {
142
- logrus .WithError (err ).Warn ("Did not manage to find current path" )
143
- }
144
-
145
138
// Read configuration from global config file
146
139
if commands .Config .ConfigFile .Exist () {
147
140
logrus .Infof ("Reading configuration from %s" , commands .Config .ConfigFile )
@@ -161,7 +154,11 @@ func initConfigs() {
161
154
}
162
155
163
156
// Read configuration from parent folders (project config)
164
- commands .Config .Navigate ("/" , pwd )
157
+ if pwd , err := paths .Getwd (); err != nil {
158
+ logrus .WithError (err ).Warn ("Did not manage to find current path" )
159
+ } else {
160
+ commands .Config .Navigate ("/" , pwd .String ())
161
+ }
165
162
166
163
// Read configuration from environment vars
167
164
commands .Config .LoadFromEnv ()
You can’t perform that action at this time.
0 commit comments