xbps-src: if euid can't write to masterdir, exit gracefully.
This commit is contained in:
parent
5dc6d62e3e
commit
cc85809e29
1 changed files with 3 additions and 5 deletions
|
@ -215,11 +215,9 @@ check_config_vars()
|
|||
msg_error "'${f}' not set in configuration file!\n"
|
||||
fi
|
||||
done
|
||||
if [ ! -d "$XBPS_MASTERDIR" ]; then
|
||||
mkdir -p "$val"
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_error "couldn't create 'XBPS_MASTERDIR' directory\n"
|
||||
fi
|
||||
if [ ! -w "$XBPS_MASTERDIR" ]; then
|
||||
echo "ERROR: not enough perms for masterdir $XBPS_MASTERDIR.\n"
|
||||
exit 1
|
||||
fi
|
||||
[ -z "${_MASTERDIR_FLAG}" ] && export _MASTERDIR="$XBPS_MASTERDIR"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue