From 19c64484599a5bfeb3b9a9dce0d380df97ce565c Mon Sep 17 00:00:00 2001 From: Elijah Lynn Date: Thu, 27 Jun 2019 15:15:13 -0700 Subject: [PATCH] Fix "no matches for wildcard" error in env-setup.fish script. (#58345) See https://github.com/ansible/ansible/pull/58345#discussion_r297288979 --- hacking/env-setup.fish | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hacking/env-setup.fish b/hacking/env-setup.fish index ee78e2ed4ba..183bcccf22e 100644 --- a/hacking/env-setup.fish +++ b/hacking/env-setup.fish @@ -65,9 +65,10 @@ set -gx ANSIBLE_LIBRARY $ANSIBLE_HOME/library # Do the work in a fuction function gen_egg_info - - if test -e $PREFIX_PYTHONPATH/ansible*.egg-info - rm -rf "$PREFIX_PYTHONPATH/ansible*.egg-info" + # Cannot use `test` on wildcards. + # @see https://github.com/fish-shell/fish-shell/issues/5960 + if count $PREFIX_PYTHONPATH/ansible*.egg-info > /dev/null + rm -rf $PREFIX_PYTHONPATH/ansible*.egg-info end if [ $QUIET ]