Join GitHub today
[2018.3] Fixes to file.grep #48830
What does this PR do?
Fixing a bug that prevents specifying wildcards for filenames.
What issues does this PR fix or reference?
When including a wildcard in the path for file.grep, the path is not being expanded because python_shell is set to False.
Updating file.grep to use glob.glob on the path to gather a list of potential files, then pass that list along to cmd.run_all. If the glob results in an empty list then pass along the original path string to report the error properly.
Commits signed with GPG?
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.
@garethgreenaway One of the tests is unhappy here. Can you look?