blob: 6cf3fa37c375090e318bc46ef0d127f409a33f05 (
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"
"git.tjp.lol/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)
}
}
|