diff --git a/cmd/mungedocs/mungedocs.go b/cmd/mungedocs/mungedocs.go index 9f51d4593fb..ea3683c5238 100644 --- a/cmd/mungedocs/mungedocs.go +++ b/cmd/mungedocs/mungedocs.go @@ -158,6 +158,12 @@ func (f fileProcessor) visit(path string) error { func newWalkFunc(fp *fileProcessor, changesNeeded *bool) filepath.WalkFunc { return func(path string, info os.FileInfo, err error) error { stat, err := os.Stat(path) + if err != nil { + if os.IsNotExist(err) { + return nil + } + return err + } if path != *rootDir && stat.IsDir() && *norecurse { return filepath.SkipDir }