ncdu: return error instead of log.Fatal in Show

This commit is contained in:
Fabian Möller 2018-09-06 15:19:02 +02:00 committed by Nick Craig-Wood
parent 57b9fff904
commit cc23ad71ce
1 changed files with 1 additions and 2 deletions

View File

@ -6,7 +6,6 @@ package ncdu
import (
"fmt"
"log"
"path"
"sort"
"strings"
@ -466,7 +465,7 @@ func NewUI(f fs.Fs) *UI {
func (u *UI) Show() error {
err := termbox.Init()
if err != nil {
log.Fatal(err)
return errors.Wrap(err, "termbox init")
}
defer termbox.Close()