Skip to content

Commit

Permalink
0 files on entry fix (#165)
Browse files Browse the repository at this point in the history
* 0 files on entry fix

* 0 files on entry fix
  • Loading branch information
incu6us authored Nov 22, 2024
1 parent 45dd127 commit f034195
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ func main() {
originPaths = append(originPaths, filePath)
}

if len(originPaths) == 0 || (len(originPaths) == 1 && originPaths[0] == "-") {
if len(originPaths) == 0 {
printUsageAndExit(errors.New("no file(s) or directory(ies) specified on input"))
}

if len(originPaths) == 1 && originPaths[0] == "-" {
originPaths[0] = reviser.StandardInput
if err := validateRequiredParam(originPaths[0]); err != nil {
printUsageAndExit(err)
Expand Down

0 comments on commit f034195

Please sign in to comment.