master > master: code - logik bei Einstellungen (debug default ein, quiet default aus beim interaktiven Modus)
This commit is contained in:
@@ -56,12 +56,10 @@ func main() {
|
||||
// initialisiere basic optionen wie Logging
|
||||
showChecks = false
|
||||
if err == nil {
|
||||
quiet := arguments.QuietModeOn()
|
||||
if arguments.InteractiveMode() {
|
||||
quiet = false
|
||||
if !(arguments.ModeRun.Happened() && arguments.InteractiveMode()) {
|
||||
logging.SetQuietMode(arguments.QuietModeOn())
|
||||
logging.SetDebugMode(arguments.DebugModeOn())
|
||||
}
|
||||
logging.SetQuietMode(quiet)
|
||||
logging.SetDebugMode(arguments.DebugModeOn())
|
||||
logging.SetAnsiMode(arguments.ShowColour())
|
||||
showChecks = arguments.ShowChecks()
|
||||
}
|
||||
@@ -73,22 +71,26 @@ func main() {
|
||||
if err == nil {
|
||||
if arguments.ModeVersion.Happened() {
|
||||
endpoints_print.Version()
|
||||
return
|
||||
} else if arguments.ModeRun.Happened() {
|
||||
if arguments.InteractiveMode() {
|
||||
err = endpoints_run.RunInteractive()
|
||||
endpoints_run.RunInteractive()
|
||||
} else {
|
||||
err = endpoints_run.RunNonInteractive(arguments.GetConfigFile())
|
||||
if err != nil {
|
||||
logging.Fatal(err)
|
||||
}
|
||||
}
|
||||
return
|
||||
} else if arguments.ModeHelp.Happened() {
|
||||
endpoints_print.Help()
|
||||
return
|
||||
} else {
|
||||
err = endpoints_run.RunInteractive()
|
||||
endpoints_run.RunInteractive()
|
||||
}
|
||||
} else if cmdMissing {
|
||||
err = endpoints_run.RunInteractive()
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
endpoints_run.RunInteractive()
|
||||
} else {
|
||||
logging.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user