Skip to content

Commit

Permalink
rename filename to dirPath
Browse files Browse the repository at this point in the history
  • Loading branch information
hay-kot committed Aug 15, 2022
1 parent c6616c3 commit 3b3b2cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,17 @@ func GfmrunActionFunc(cCtx *cli.Context) error {
return err
}

filename := cCtx.Args().Get(0)
if filename == "" {
filename = "README.md"
dirPath := cCtx.Args().Get(0)
if dirPath == "" {
dirPath = "README.md"
}

walk := cCtx.Bool("walk")
sources := []string{}

if walk {
// Walk the directory and find all markdown files.
err := filepath.Walk(filename, func(path string, info os.FileInfo, err error) error {
err := filepath.Walk(dirPath, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
Expand All @@ -252,7 +252,7 @@ func GfmrunActionFunc(cCtx *cli.Context) error {
return err
}
} else {
sources = append(sources, filename)
sources = append(sources, dirPath)
}

var counter int
Expand Down

0 comments on commit 3b3b2cd

Please sign in to comment.