mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +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:
@@ -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