New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2018.3] Fixes to file.grep #48830

merged 2 commits into from Jul 31, 2018


None yet
3 participants

garethgreenaway commented Jul 30, 2018

What does this PR do?

Fixing a bug that prevents specifying wildcards for filenames.

What issues does this PR fix or reference?


Previous Behavior

When including a wildcard in the path for file.grep, the path is not being expanded because python_shell is set to False.

New Behavior

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.

Tests written?


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 garethgreenaway requested a review from terminalmage Jul 30, 2018


This comment has been minimized.


rallytime commented Jul 31, 2018

garethgreenaway added some commits Jul 30, 2018

@garethgreenaway garethgreenaway force-pushed the garethgreenaway:48659_file_grep_glob_fix branch from bea7166 to 0791b0a Jul 31, 2018

@rallytime rallytime merged commit e23ba01 into saltstack:2018.3 Jul 31, 2018

6 of 8 checks passed

jenkins/pr/py2-centos-7 The py2-centos-7 job has failed
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has failed
WIP ready for review
continuous-integration/jenkins/pr-merge This commit looks good
jenkins/pr/docs The docs job has passed
jenkins/pr/lint The lint job has passed
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment