diff options
author | T <t@tjp.lol> | 2025-08-02 17:25:59 -0600 |
---|---|---|
committer | T <t@tjp.lol> | 2025-08-04 09:34:14 -0600 |
commit | 8be5f93f5b2d4b6f438ca84094937a0f7101c59b (patch) | |
tree | 3cedb6379818a28179e269477c12ae06dd57ca36 /cmd |
Initial commit of punchcard.
Contains working time tracking commands, and the stub of a command to
generate reports.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/punch/main.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cmd/punch/main.go b/cmd/punch/main.go new file mode 100644 index 0000000..c98b970 --- /dev/null +++ b/cmd/punch/main.go @@ -0,0 +1,21 @@ +package main + +import ( + "errors" + "fmt" + "os" + "punchcard/internal/commands" +) + +func main() { + if err := commands.Execute(); err != nil { + // Check for specific error types that need special exit codes + if errors.Is(err, commands.ErrNoActiveTimer) { + fmt.Fprintf(os.Stderr, "%s\n", err.Error()) + os.Exit(2) // Exit code 2 for no active timer as per CLAUDE.md + } + + // Default error handling + os.Exit(1) + } +}
\ No newline at end of file |