示例#1
0
func (app *App) Launch(command *exec.Cmd, settings config.Settings, userInterface ui.UserInterface) (err error) {
	log.Info("Starting the app...")

	log.Debug("Hiding the user interface...")
	userInterface.Hide()
	log.Notice("User interface hidden")

	if settings.IsSkipAppOutput() {
		return command.Run()
	}
	var outputBytes []byte
	outputBytes, err = command.CombinedOutput()

	if outputBytes != nil && len(outputBytes) > 0 {
		log.Info("------------------------------")
		log.Info(string(outputBytes))
		log.Info("------------------------------")
	}

	return err
}
示例#2
0
func dismissUserInterface(userInterface ui.UserInterface) {
	log.SetCallback(func(level logging.Level, message string) {})

	userInterface.Hide()
}