File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 18
18
package root
19
19
20
20
import (
21
+ "fmt"
21
22
"io/ioutil"
22
23
"os"
23
24
"path/filepath"
@@ -116,6 +117,12 @@ func preRun(cmd *cobra.Command, args []string) {
116
117
117
118
// initConfigs initializes the configuration from the specified file.
118
119
func 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
+ }
119
126
// Start with default configuration
120
127
if conf , err := configs .NewConfiguration (); err != nil {
121
128
logrus .WithError (err ).Error ("Error creating default configuration" )
You can’t perform that action at this time.
0 commit comments