Skip to content

Commit

Permalink
🐛 avoid printing home-path for root
Browse files Browse the repository at this point in the history
Root just uses the system path, so trying to print a home path that is an empty string is confusing and wrong.

Signed-off-by: Dominik Richter <[email protected]>
  • Loading branch information
arlimus committed Sep 22, 2023
1 parent 0eae687 commit a7b38fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/cnquery/cmd/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func printProviders(p []*providers.Provider) {

func printProviderPath(path string, list []*providers.Provider, printEmpty bool) {
if list == nil {
if printEmpty {
if printEmpty && path != "" {
fmt.Println("")
log.Info().Msg(path + " has no providers")
}
Expand Down

0 comments on commit a7b38fc

Please sign in to comment.