File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import (
2121 "fmt"
2222 "io/ioutil"
2323 "os"
24- "path/filepath"
2524
2625 "github.com/arduino/arduino-cli/output"
2726
@@ -136,12 +135,6 @@ func initConfigs() {
136135 commands .Config = conf
137136 }
138137
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-
145138 // Read configuration from global config file
146139 if commands .Config .ConfigFile .Exist () {
147140 logrus .Infof ("Reading configuration from %s" , commands .Config .ConfigFile )
@@ -161,7 +154,11 @@ func initConfigs() {
161154 }
162155
163156 // 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+ }
165162
166163 // Read configuration from environment vars
167164 commands .Config .LoadFromEnv ()
You can’t perform that action at this time.
0 commit comments