From 64c18b15a4a0c8b7e59587aa09de92d52c698ede Mon Sep 17 00:00:00 2001 From: Steve Moyer Date: Sun, 27 Nov 2022 20:51:37 -0500 Subject: feat: wrap ErrNoConfigEntry to report missing key Resolves #935. --- commands/webui.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'commands') diff --git a/commands/webui.go b/commands/webui.go index 5fe66aa7..a2a01645 100644 --- a/commands/webui.go +++ b/commands/webui.go @@ -2,6 +2,7 @@ package commands import ( "context" + "errors" "fmt" "io" "log" @@ -162,7 +163,7 @@ func runWebUI(env *execenv.Env, opts webUIOptions) error { env.Out.Println("Press Ctrl+c to quit") configOpen, err := env.Repo.AnyConfig().ReadBool(webUIOpenConfigKey) - if err == repository.ErrNoConfigEntry { + if errors.Is(err, repository.ErrNoConfigEntry) { // default to true configOpen = true } else if err != nil { -- cgit