mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-16 10:17:41 +00:00
Making sure context is initialised before using it
Now checkong context is not nil before setting panicked = true
This commit is contained in:
1 parent
0c09bdedaa
commit
6ff601f4a2
1 file changed
+3
-1
+3
-1
@@ -59,7 +59,9 @@ func Fatal(err error) {
|
||||
if err == commander.ErrFlagError || err == commander.ErrCommandError {
|
||||
returnCode = 2
|
||||
}
|
||||
context.panicked = true
|
||||
if context != nil {
|
||||
context.panicked = true
|
||||
}
|
||||
panic(&FatalError{ReturnCode: returnCode, Message: err.Error()})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user