Skip to content

Commit

Permalink
Fixed for non-existing files
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith Monihen committed Apr 17, 2020
1 parent 46f5a85 commit 99f1b71
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func loadBuiltInRuleSet(filename string) (assertion.RuleSet, error) {
assertion.Debugf("Failed to add RuleSet: %v\n", err)
return assertion.RuleSet{}, err // returns empty rule set
}
} else {
} else if strings.HasSuffix(filename, "/") {
filesInBox := box.List()
if len(filesInBox) > 0 {
// Get each file in that box
Expand All @@ -264,10 +264,11 @@ func loadBuiltInRuleSet(filename string) (assertion.RuleSet, error) {
}
}
}
} else {
return assertion.RuleSet{}, errors.New("File or directory doesnt exist")
}
} else {
return assertion.RuleSet{}, errors.New("File or directory doesnt exist")
}

return ruleSet, nil
}

Expand Down

0 comments on commit 99f1b71

Please sign in to comment.