blob: c98b9709c52f8be87e83d10216a823e7779af523 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)
}
}
|