File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
internal/cli/configuration Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1616package configuration
1717
1818import (
19+ "path/filepath"
1920 "testing"
2021
2122 "github.com/stretchr/testify/require"
@@ -41,8 +42,9 @@ func TestInit(t *testing.T) {
4142}
4243
4344func TestFindConfigFile (t * testing.T ) {
45+ defaultConfigFile := filepath .Join (getDefaultArduinoDataDir (), "arduino-cli.yaml" )
4446 configFile := FindConfigFileInArgsFallbackOnEnv ([]string {"--config-file" })
45- require .Equal (t , "" , configFile )
47+ require .Equal (t , defaultConfigFile , configFile )
4648
4749 configFile = FindConfigFileInArgsFallbackOnEnv ([]string {"--config-file" , "some/path/to/config" })
4850 require .Equal (t , "some/path/to/config" , configFile )
@@ -51,7 +53,7 @@ func TestFindConfigFile(t *testing.T) {
5153 require .Equal (t , "some/path/to/config/arduino-cli.yaml" , configFile )
5254
5355 configFile = FindConfigFileInArgsFallbackOnEnv ([]string {})
54- require .Equal (t , "" , configFile )
56+ require .Equal (t , defaultConfigFile , configFile )
5557
5658 t .Setenv ("ARDUINO_CONFIG_FILE" , "some/path/to/config" )
5759 configFile = FindConfigFileInArgsFallbackOnEnv ([]string {})
You can’t perform that action at this time.
0 commit comments