summaryrefslogtreecommitdiff
path: root/hacking/env-setup
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2020-03-30 11:00:45 -0700
committerMatt Clay <matt@mystile.com>2020-03-30 13:56:43 -0700
commit7323d5dd0dadad1c706eae331526cd481785456a (patch)
treec143469e49f44603cb838cd80df7b4ae685564c4 /hacking/env-setup
parentd8d7a30ea672a1df6020b131d84941f59dd8262e (diff)
downloadansible-7323d5dd0dadad1c706eae331526cd481785456a.tar.gz
Fix references to old egg-info directory.
Diffstat (limited to 'hacking/env-setup')
-rw-r--r--hacking/env-setup7
1 files changed, 5 insertions, 2 deletions
diff --git a/hacking/env-setup b/hacking/env-setup
index d4ac830007..46f58fecda 100644
--- a/hacking/env-setup
+++ b/hacking/env-setup
@@ -61,8 +61,11 @@ expr "$MANPATH" : "${PREFIX_MANPATH}.*" > /dev/null || prepend_path MANPATH "$PR
# Do the work in a function so we don't repeat ourselves later
gen_egg_info()
{
- if [ -e "$PREFIX_PYTHONPATH/ansible.egg-info" ] ; then
- \rm -rf "$PREFIX_PYTHONPATH/ansible.egg-info"
+ # check for current and past egg-info directory names
+ if ls "$PREFIX_PYTHONPATH"/ansible*.egg-info >/dev/null 2>&1; then
+ # bypass shell aliases with leading backslash
+ # see https://github.com/ansible/ansible/pull/11967
+ \rm -rf "$PREFIX_PYTHONPATH"/ansible*.egg-info
fi
$PYTHON_BIN setup.py egg_info
}