Skip to content

Commit

Permalink
fix: exe to suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Jul 12, 2023
1 parent b4b9282 commit 88ea0b2
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 @@ -424,7 +424,11 @@ All long form (--) flags can be toggled with the dig-standard +[no]flag notation
}

// Set qname if not set by flag
if opts.Name == "" && !containsAny(arg, []string{"@", "/", "\\", ".exe", "+"}) && !typeFound && !strings.HasPrefix(arg, "-") {
if opts.Name == "" &&
!containsAny(arg, []string{"@", "/", "\\", "+"}) &&
!typeFound &&
!strings.HasSuffix(arg, ".exe") &&
!strings.HasPrefix(arg, "-") {
opts.Name = arg
}
}
Expand Down

0 comments on commit 88ea0b2

Please sign in to comment.