We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 878037b commit dffafa1Copy full SHA for dffafa1
ignite/cmd/ignite/main.go
@@ -12,22 +12,26 @@ import (
12
)
13
14
func main() {
15
+ os.Exit(run())
16
+}
17
+
18
+func run() int {
19
ctx := clictx.From(context.Background())
20
21
cmd := ignitecmd.New()
22
23
// Load plugins if any
24
if err := ignitecmd.LoadPlugins(ctx, cmd); err != nil {
25
fmt.Printf("Error while loading chain's plugins: %v\n", err)
- os.Exit(1)
26
+ return 1
27
}
28
defer ignitecmd.UnloadPlugins()
29
30
err := cmd.ExecuteContext(ctx)
31
32
if ctx.Err() == context.Canceled || err == context.Canceled {
33
fmt.Println("aborted")
- return
34
+ return 0
35
36
37
if err != nil {
@@ -38,7 +42,7 @@ func main() {
38
42
} else {
39
43
fmt.Println(err)
40
44
41
-
45
46
47
48
0 commit comments