mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Feat: add an error message when WTF was failed
This is just a minor change to avoid a small number of inexperienced users not be intimidated by a minor mistake, such as the incorrect setting of the TERM environment variable. I hope this will be improved a bit of user experience for let WTF more popular.
This commit is contained in:
parent
fe67bedc86
commit
5861ad3f59
2
wtf.go
2
wtf.go
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
@ -232,6 +233,7 @@ func main() {
|
|||||||
go watchForConfigChanges(app, cmdFlags.Config, grid, pages)
|
go watchForConfigChanges(app, cmdFlags.Config, grid, pages)
|
||||||
|
|
||||||
if err := app.SetRoot(pages, true).Run(); err != nil {
|
if err := app.SetRoot(pages, true).Run(); err != nil {
|
||||||
|
fmt.Printf("An error occurred: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user