Skip to content

Commit

Permalink
change: exit at load dict file error;
Browse files Browse the repository at this point in the history
  • Loading branch information
MapoMagpie committed Jun 28, 2024
1 parent 7dd2091 commit 3533a08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/goccy/go-yaml"
)

var version = "1.0.7"
var version = "1.0.8"

type Options struct {
RestartRimeCmd string `yaml:"restart_rime_cmd"`
Expand Down
4 changes: 2 additions & 2 deletions dict/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func LoadItems(paths ...string) (fes []*FileEntries) {
fileNames := make(map[string]bool)
for fe := range ch {
if fe.Err != nil {
log.Printf("load [%s] error: %s", fe.FilePath, fe.Err)
continue
fmt.Println("load dict file error: ", fe.Err)
os.Exit(0)
}
if _, ok := fileNames[fe.FilePath]; ok {
log.Printf("file [%s] already loaded", fe.FilePath)
Expand Down

0 comments on commit 3533a08

Please sign in to comment.