mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
root: fix setupHook to work with "set -u"
This commit is contained in:
parent
35d99698ae
commit
bd0c4dd6ab
@ -1,9 +1,13 @@
|
||||
thisroot () {
|
||||
# Workaround thisroot.sh dependency on man
|
||||
if [ -z "${MANPATH}" ]; then
|
||||
if [ -z "${MANPATH-}" ]; then
|
||||
MANPATH=:
|
||||
fi
|
||||
local oldOpts="-u"
|
||||
shopt -qo nounset || oldOpts="+u"
|
||||
set +u
|
||||
source @out@/bin/thisroot.sh
|
||||
set "$oldOpts"
|
||||
}
|
||||
|
||||
postHooks+=(thisroot)
|
||||
|
Loading…
Reference in New Issue
Block a user