Skip to content

Commit 854608f

Browse files
committed
update litecmd.go
1 parent 2c0a29a commit 854608f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tiny/litecmd.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ func onEvalJumpSubCommands(ctx context.Context, c cli.Cmd) (it cli.EvalIterator,
3232
} else {
3333
baseDir = path.Join(baseDir, "ext")
3434
}
35+
if !dir.FileExists(baseDir) {
36+
return
37+
}
38+
3539
err = dir.ForFile(baseDir, func(depth int, dirName string, fi os.DirEntry) (stop bool, err error) {
3640
if fi.Name()[0] == '.' {
3741
return
@@ -78,7 +82,7 @@ func (s *liteCmdS) GetTitleName() string { return s.name() }
7882
func (s *liteCmdS) GetTitleNamesArray() []string { return []string{s.name()} }
7983
func (s *liteCmdS) GetTitleNames() string { return s.name() }
8084

81-
func (s *liteCmdS) App() cli.App { return s.Root().App() }
85+
func (s *liteCmdS) App() cli.App { return nil }
8286
func (s *liteCmdS) Set() store.Store { return s.Root().App().Store() }
8387
func (s *liteCmdS) Store() store.Store { return cmdr.Store() }
8488

@@ -142,6 +146,7 @@ func (s *liteCmdS) SetHitTitle(title string) {
142146
func (s *liteCmdS) HitTitle() string { return s.hitTitle }
143147
func (s *liteCmdS) HitTimes() int { return s.hitTimes }
144148

149+
func (s *liteCmdS) RedirectTo() (dottedPath string) { return }
145150
func (s *liteCmdS) SetRedirectTo(dottedPath string) {}
146151

147152
func (s *liteCmdS) CanInvoke() bool {

0 commit comments

Comments
 (0)