Skip to content

Commit

Permalink
Enable glob functionality on Windows (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
ross-spencer authored and richardlehane committed Mar 21, 2023
1 parent 22dfa35 commit 54bf659
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/sf/sf.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"io"
"log"
"os"
"path/filepath"
"sync"
"time"

Expand Down Expand Up @@ -491,7 +492,13 @@ func main() {
ctxts <- ctx
identifyRdr(os.Stdin, ctx, ctxts, getCtx)
} else {
err = identify(ctxts, v, "", *coe, *nr, d, getCtx)
globs, err := filepath.Glob(v)
if err != nil {
log.Fatalln(fmt.Sprintf("[FATAL] bad glob pattern: %e", err))
}
for _, glob := range globs {
err = identify(ctxts, glob, "", *coe, *nr, d, getCtx)
}
}
if err != nil {
break
Expand Down

0 comments on commit 54bf659

Please sign in to comment.