Skip to content

Commit d2b1a2b

Browse files
committed
Default to driller (fix #3)
1 parent 8cdb00f commit d2b1a2b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

main.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import (
77
dirp "github.com/avindra/dirp/src"
88
)
99

10+
func driller(path string) {
11+
cfg := dirp.FindDirs(path)
12+
dirp.Selector(cfg)
13+
}
14+
1015
func main() {
1116
args := os.Args
1217
args = args[1:]
@@ -22,8 +27,7 @@ func main() {
2227

2328
arg0 := args[0]
2429
if dirp.IsDir(arg0) {
25-
cfg := dirp.FindDirs(arg0)
26-
dirp.Selector(cfg)
30+
driller(arg0)
2731
} else if arg0 == "hook" {
2832
if len(args) >= 2 {
2933
switch args[1] {
@@ -59,5 +63,8 @@ NOARGS:
5963

6064
if len(cfg) > 0 {
6165
dirp.Selector(cfg)
66+
} else {
67+
// No config detected, default to driller
68+
driller(".")
6269
}
6370
}

0 commit comments

Comments
 (0)