nil value check

dev
LuitelSamikshya 2022-04-18 17:21:33 -05:00
parent b26ebcfa60
commit 5eae7159c7
2 changed files with 8 additions and 3 deletions

View File

@ -359,9 +359,14 @@ func (r *Runner) RunEnumeration() error {
var results *atomic.Bool
if r.options.AutomaticScan {
results, err = r.executeSmartWorkflowInput(executerOpts, store, engine)
if results, err = r.executeSmartWorkflowInput(executerOpts, store, engine); err != nil {
return err
}
} else {
results, err = r.executeTemplatesInput(store, engine)
if results, err = r.executeTemplatesInput(store, engine); err != nil {
return err
}
}
if r.interactsh != nil {

View File

@ -81,7 +81,7 @@ func (c *Catalog) GetTemplatePath(target string) ([]string, error) {
return nil, errors.Wrap(err, "could not find directory matches")
}
if len(matches) == 0 {
return nil, errors.Errorf("no templates found in path")
return nil, errors.Errorf("no templates found in path %s", absPath)
}
return matches, nil
}