make which2.sh script more robust

This commit is contained in:
Than Ngo 2022-02-09 16:17:41 +01:00
parent 372c1bae6c
commit 1be483011a
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
Summary: Displays where a particular program in your path is located
Name: which
Version: 2.21
Release: 32%{?dist}
Release: 33%{?dist}
License: GPLv3
Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
Source1: which2.sh
@ -41,6 +41,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%{_mandir}/man1/which.1*
%changelog
* Wed Feb 09 2022 Than Ngo <than@redhat.com> - 2.21-33
- make which2.sh script more robust,
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

View File

@ -20,7 +20,7 @@ bash|sh)
;;
esac
which () {
function which {
(alias; eval ${which_declare}) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}