fix 'find: Failed to restore initial working directory'

This commit is contained in:
GenZmeY 2020-08-15 15:32:10 +03:00
parent 5788b294d9
commit 0c13ad296f
2 changed files with 7 additions and 4 deletions

View File

@ -67,7 +67,7 @@ function run_as_steamuser () # $@: command
shift 3; cmd_main "$@" shift 3; cmd_main "$@"
elif [[ -n $(groups "$(whoami)" | grep -Fo 'wheel') ]] || [[ "$(whoami)" == "root" ]]; then elif [[ -n $(groups "$(whoami)" | grep -Fo 'wheel') ]] || [[ "$(whoami)" == "root" ]]; then
export INC_LIBS="" export INC_LIBS=""
sudo -u "$SteamUser" "$@" sudo -iu "$SteamUser" "$@"
else else
echo "You must be a $SteamUser, root or sudo-user to run this command." echo "You must be a $SteamUser, root or sudo-user to run this command."
fi fi
@ -79,7 +79,7 @@ function run_as_root () # $@: command
shift 3; cmd_main "$@" shift 3; cmd_main "$@"
elif [[ -n $(groups "$(whoami)" | grep -Fo 'wheel') ]]; then elif [[ -n $(groups "$(whoami)" | grep -Fo 'wheel') ]]; then
export INC_LIBS="" export INC_LIBS=""
sudo "$@" sudo -i "$@"
else else
echo "You must be root or sudo-user to run this command." echo "You must be root or sudo-user to run this command."
fi fi

View File

@ -1,7 +1,7 @@
%global steamuser steam %global steamuser steam
Name: kf2-srv Name: kf2-srv
Version: 0.15.2 Version: 0.15.3
Release: 1%{dist} Release: 1%{dist}
Summary: Killing Floor 2 server Summary: Killing Floor 2 server
Group: Amusements/Games Group: Amusements/Games
@ -101,7 +101,10 @@ if [[ $1 == 1 ]]; then # Install
fi fi
%changelog %changelog
* Fri Aug 14 2020 GenZmeY <genzmey@gmail.com> - 0.15.2-1 * Sat Aug 15 2020 GenZmeY <genzmey@gmail.com> - 0.15.3-1
- fix 'find: Failed to restore initial working directory'.
* Sat Aug 15 2020 GenZmeY <genzmey@gmail.com> - 0.15.2-1
- fix bash completion for commands without parameters; - fix bash completion for commands without parameters;
- fix bash completion for use not existing command group. - fix bash completion for use not existing command group.