diff --git a/internal/cmd/daemon/config.go b/internal/cmd/daemon/config.go index 910e48a..1484389 100644 --- a/internal/cmd/daemon/config.go +++ b/internal/cmd/daemon/config.go @@ -26,10 +26,12 @@ func CmdConfig() *cli.Command { func CmdTestConfig(_ context.Context, _ *cli.Command) error { testMain := testMainConfig() + testDocker, _ := testDockerConfig() fmt.Println( "***\n"+i18n.Lang.T("cmd.daemon.config.test.settingTitle"), "\n", testMain, + "\n", testDocker, "\n***", ) return nil @@ -48,6 +50,16 @@ func testMainConfig() string { return resultOk(configTitle) } +func testDockerConfig() (message string, dockerSupport bool) { + configTitle := "docker" + _, dockerSupport, err := setting.Config.OtherSettingsPath.ToDockerConfig(setting.Config.BinaryLocations) + if err != nil { + return resultError(configTitle, err), false + } + + return resultOk(configTitle), dockerSupport +} + func resultOk(title string) string { return fmt.Sprintf("%s: \033[32mOk\033[0m", title) }