Blame SOURCES/0001-fix-Improve-output-during-disconnect.patch

f94f6d
From 31db6e5a21afb62183ea6721fd79d515fc9b77b9 Mon Sep 17 00:00:00 2001
f94f6d
From: Link Dupont <link@sub-pop.net>
f94f6d
Date: Wed, 30 Jun 2021 12:36:17 -0400
f94f6d
Subject: [PATCH 1/2] fix: Improve output during 'disconnect'
f94f6d
f94f6d
Now print the status of the disconnection process, including the results afterwards.
f94f6d
f94f6d
Fixes ESSNTL-837
f94f6d
f94f6d
Signed-off-by: Link Dupont <link@sub-pop.net>
f94f6d
---
f94f6d
 cmd/ygg/main.go | 8 ++++++--
f94f6d
 1 file changed, 6 insertions(+), 2 deletions(-)
f94f6d
f94f6d
diff --git a/cmd/ygg/main.go b/cmd/ygg/main.go
f94f6d
index 5226bce..f5c5c47 100644
f94f6d
--- a/cmd/ygg/main.go
f94f6d
+++ b/cmd/ygg/main.go
f94f6d
@@ -162,17 +162,21 @@ func main() {
f94f6d
 				fmt.Printf("Disconnecting %v from %v.\nThis might take a few seconds.\n\n", hostname, yggdrasil.Provider)
f94f6d
 
f94f6d
 				s := spinner.New(spinner.CharSets[9], 100*time.Millisecond)
f94f6d
-				defer s.Stop()
f94f6d
-				s.Suffix = " Disconnecting..."
f94f6d
+				s.Suffix = fmt.Sprintf(" Deactivating the %v daemon", yggdrasil.BrandName)
f94f6d
 				s.Start()
f94f6d
 				if err := deactivate(); err != nil {
f94f6d
 					return cli.Exit(err, 1)
f94f6d
 				}
f94f6d
+				s.Stop()
f94f6d
+				fmt.Printf(failPrefix+" Deactivated the %v daemon\n", yggdrasil.BrandName)
f94f6d
 
f94f6d
+				s.Suffix = " Disconnecting from Red Hat Subscription Management..."
f94f6d
+				s.Start()
f94f6d
 				if err := unregister(); err != nil {
f94f6d
 					return cli.Exit(err, 1)
f94f6d
 				}
f94f6d
 				s.Stop()
f94f6d
+				fmt.Printf(failPrefix + " Disconnected from Red Hat Subscription Management\n")
f94f6d
 
f94f6d
 				fmt.Printf("\nManage your Red Hat connector systems: https://red.ht/connector\n")
f94f6d
 
f94f6d
-- 
f94f6d
2.31.1
f94f6d