From 297dafbd45cd27165048262ef8ad00a8cb3e2b06 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 22 Apr 2022 10:55:17 +0200 Subject: CLI: Deregister to save configuration --- cli/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cli/main.go') diff --git a/cli/main.go b/cli/main.go index a9a1167..d5c3aa8 100644 --- a/cli/main.go +++ b/cli/main.go @@ -1,9 +1,9 @@ package main import ( + "errors" "flag" "fmt" - "errors" "os" "os/exec" "strings" @@ -33,7 +33,6 @@ func writeGraph(filename string) error { graph := state.GenerateGraph() f, err := os.Create(filename) - if err != nil { return errors.New(fmt.Sprintf("Failed to create file %s with error %v", filename, err)) } @@ -76,6 +75,8 @@ func main() { fmt.Println(config) + state.Deregister() + return } -- cgit v1.2.3