diff options
author | Steve Moyer <smoyer1@selesy.com> | 2022-11-27 20:51:37 -0500 |
---|---|---|
committer | Steve Moyer <smoyer1@selesy.com> | 2022-11-27 20:51:37 -0500 |
commit | 64c18b15a4a0c8b7e59587aa09de92d52c698ede (patch) | |
tree | 8738e651e57c3cf7a21ae76e9733206ccea7a6b9 /commands | |
parent | c6bb6b9c7ecddb679966b1561e2e909a9ee5e8cd (diff) | |
download | git-bug-64c18b15a4a0c8b7e59587aa09de92d52c698ede.tar.gz |
feat: wrap ErrNoConfigEntry to report missing key
Resolves #935.
Diffstat (limited to 'commands')
-rw-r--r-- | commands/webui.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |