From 8be5f93f5b2d4b6f438ca84094937a0f7101c59b Mon Sep 17 00:00:00 2001 From: T Date: Sat, 2 Aug 2025 17:25:59 -0600 Subject: Initial commit of punchcard. Contains working time tracking commands, and the stub of a command to generate reports. --- cmd/punch/main.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 cmd/punch/main.go (limited to 'cmd') 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 -- cgit v1.2.3