...
1 package main
2
3 import (
4 "context"
5 "os"
6 "os/exec"
7 "os/signal"
8
9 "edge-infra.dev/hack/tools/apko-updater-bot/cmd"
10 )
11
12 func main() {
13
14
15 apkoPath, err := exec.LookPath("apko")
16 if err != nil {
17 panic("the apko binary was not found and is required in the runtime environment")
18 }
19 println("apko binary found at", apkoPath)
20 ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
21 defer cancel()
22 if err := cmd.Run(ctx); err != nil {
23 cancel()
24 os.Exit(1)
25 }
26 }
27
View as plain text