mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
parent
85c5b89593
commit
c8b5ab75b7
4 changed files with 22 additions and 6 deletions
|
@ -68,7 +68,7 @@ func newSystemErrorF(format string, a ...interface{}) commandError {
|
|||
// Catch some of the obvious user errors from Cobra.
|
||||
// We don't want to show the usage message for every error.
|
||||
// The below may be to generic. Time will show.
|
||||
var userErrorRegexp = regexp.MustCompile("argument|flag|shorthand")
|
||||
var userErrorRegexp = regexp.MustCompile("unknown flag")
|
||||
|
||||
func isUserError(err error) bool {
|
||||
if cErr, ok := err.(commandError); ok && cErr.isUserError() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue