Honor `--quiet` parameter properly in fish shell (#77180)

* The `^` stderr redirection is deprecated
* Setting `-q` for `setup.py` in `gen_egg_info` is redundant
pull/77211/head
Philip Douglass 3 years ago committed by GitHub
parent 8b2e628565
commit e6f63be7a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
bugfixes:
- hacking - fix incorrect usage of deprecated fish-shell redirection operators
that failed to honor ``--quiet`` flag when sourced (https://github.com/ansible/ansible/pull/77180).

@ -80,20 +80,15 @@ function gen_egg_info
rm -rf $PREFIX_PYTHONPATH/ansible*.egg-info
end
if [ $QUIET ]
set options '-q'
end
eval $PYTHON_BIN setup.py $options egg_info
eval $PYTHON_BIN setup.py egg_info
end
pushd $ANSIBLE_HOME
if [ $QUIET ]
gen_egg_info ^ /dev/null
find . -type f -name "*.pyc" -exec rm -f '{}' ';' ^ /dev/null
gen_egg_info &> /dev/null
find . -type f -name "*.pyc" -exec rm -f '{}' ';' &> /dev/null
else
gen_egg_info
find . -type f -name "*.pyc" -exec rm -f '{}' ';'

Loading…
Cancel
Save