summaryrefslogtreecommitdiff
path: root/cmd/punch
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/punch')
-rw-r--r--cmd/punch/main.go21
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