diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-22 10:55:17 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-22 10:55:17 +0200 |
| commit | 297dafbd45cd27165048262ef8ad00a8cb3e2b06 (patch) | |
| tree | 3741f6152ad5139ac5e988a4c066b8d7c44d77b4 /cli/main.go | |
| parent | 04cd26387de8e28da4d23ca92a9e9f045cad1665 (diff) | |
CLI: Deregister to save configuration
Diffstat (limited to 'cli/main.go')
| -rw-r--r-- | cli/main.go | 5 |
1 files changed, 3 insertions, 2 deletions
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 } |
