File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1818package root
1919
2020import (
21+ "fmt"
2122 "io/ioutil"
2223 "os"
2324 "path/filepath"
@@ -116,6 +117,12 @@ func preRun(cmd *cobra.Command, args []string) {
116117
117118// initConfigs initializes the configuration from the specified file.
118119func initConfigs () {
120+ // Return error if an old configuration file is found
121+ if paths .New (".cli-config.yml" ).Exist () {
122+ logrus .Error ("Old configuration file detected. Ensure you are using the new `arduino-cli.yaml` configuration" )
123+ formatter .PrintError (fmt .Errorf ("old configuration file detected" ), "Ensure you are using the new `arduino-cli.yaml` configuration" )
124+ os .Exit (commands .ErrGeneric )
125+ }
119126 // Start with default configuration
120127 if conf , err := configs .NewConfiguration (); err != nil {
121128 logrus .WithError (err ).Error ("Error creating default configuration" )
You can’t perform that action at this time.
0 commit comments