From 3fae907830ba8cc08568eaf9a391d2459f3d5c49 Mon Sep 17 00:00:00 2001 From: Dominik Richter Date: Thu, 21 Sep 2023 21:25:47 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20avoid=20printing=20home-path=20f?= =?UTF-8?q?or=20root=20(#1842)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root just uses the system path, so trying to print a home path that is an empty string is confusing and wrong. Before: ![image](https://github.com/mondoohq/cnquery/assets/1307529/1e4333be-cc6e-43fb-9608-ea458bb85f6a) After: ![image](https://github.com/mondoohq/cnquery/assets/1307529/9247a2a0-bd8b-48a1-a368-2ed1d82b77c7) Signed-off-by: Dominik Richter --- apps/cnquery/cmd/providers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/cnquery/cmd/providers.go b/apps/cnquery/cmd/providers.go index 812e25511f..9272128e22 100644 --- a/apps/cnquery/cmd/providers.go +++ b/apps/cnquery/cmd/providers.go @@ -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") }