mirror of
https://github.com/mudler/luet.git
synced 2025-09-25 06:24:46 +00:00
Do not use os.Exit in exportable packages (#286)
Fixes #285 Signed-off-by: David Cassany <dcassany@suse.com>
This commit is contained in:
committed by
GitHub
parent
4943ed6aef
commit
881bf03c3d
@@ -135,7 +135,7 @@ func (c *Context) Copy() types.Context {
|
||||
func (c *Context) Warning(mess ...interface{}) {
|
||||
c.Logger.Warn(mess...)
|
||||
if c.Config.General.FatalWarns {
|
||||
os.Exit(2)
|
||||
panic("panic on warning")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ func (c *Context) Warn(mess ...interface{}) {
|
||||
func (c *Context) Warnf(t string, mess ...interface{}) {
|
||||
c.Logger.Warnf(t, mess...)
|
||||
if c.Config.General.FatalWarns {
|
||||
os.Exit(2)
|
||||
panic("panic on warning")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user