aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorTeddy Wing2017-06-03 20:32:17 +0200
committerTeddy Wing2017-06-03 20:53:14 +0200
commit57f64ce855309b27ea483af81cfdb1d38d1db7f3 (patch)
tree15e550bede795dcc6f3dd6f6b9fc38f3653d8fda /main.go
parent43cf753e794c37a8422e42389b077f1d20edc7af (diff)
downloadtimetasker-57f64ce855309b27ea483af81cfdb1d38d1db7f3.tar.bz2
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.
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
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 {