From 57f64ce855309b27ea483af81cfdb1d38d1db7f3 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 3 Jun 2017 20:32:17 +0200 Subject: main.go: If `--write-config` is passed, do work and exit Ensure that we're not actually submitting a time entry if the `--write-config` flag was passed. In that case, we just want to write the empty config file and exit successfully. --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index a2fafc8..90bb653 100644 --- a/main.go +++ b/main.go @@ -60,8 +60,9 @@ func main() { fmt.Println(err) os.Exit(1) } - } + os.Exit(0) + } // Submit time entry project, ok := config.Projects[*project_alias] if !ok { -- cgit v1.2.3