We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc2e0c7 commit 6ed6c06Copy full SHA for 6ed6c06
cmd/docker-mcp/hints/hints.go
@@ -7,15 +7,21 @@ import (
7
8
func Enabled(dockerCli command.Cli) bool {
9
configFile := dockerCli.ConfigFile()
10
- if configFile != nil && configFile.Plugins != nil {
11
- if pluginConfig, ok := configFile.Plugins["-x-cli-hints"]; ok {
12
- if enabledValue, exists := pluginConfig["enabled"]; exists {
13
- return enabledValue == "true"
14
- }
15
+ if configFile == nil || configFile.Plugins == nil {
+ return true
16
}
17
18
- return true
+ pluginConfig, ok := configFile.Plugins["-x-cli-hints"]
+ if !ok {
+ }
+
19
+ enabledValue, exists := pluginConfig["enabled"]
20
+ if !exists {
21
22
23
24
+ return enabledValue == "true"
25
26
27
var (
0 commit comments