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 9990d17 commit 86ec81fCopy full SHA for 86ec81f
cmd/semantic-release/main.go
@@ -21,10 +21,15 @@ import (
21
// SRVERSION is the semantic-release version (added at compile time)
22
var SRVERSION string
23
24
+var exitHandler func()
25
+
26
func errorHandler(logger *log.Logger) func(error, ...int) {
27
return func(err error, exitCode ...int) {
28
if err != nil {
29
logger.Println(err)
30
+ if exitHandler != nil {
31
+ exitHandler()
32
+ }
33
if len(exitCode) == 1 {
34
os.Exit(exitCode[0])
35
return
@@ -61,7 +66,9 @@ func cliHandler(c *cli.Context) error {
61
66
62
67
pluginManager, err := manager.New(conf)
63
68
exitIfError(err)
64
- defer pluginManager.Stop()
69
+ exitHandler = func() {
70
+ pluginManager.Stop()
71
65
72
73
ci, err := pluginManager.GetCICondition()
74
0 commit comments