Unify missing basedir error
This commit is contained in:
parent
b3c816b428
commit
5d5231e886
|
@ -257,11 +257,6 @@ FOUND_BASEDIR=0
|
|||
for arg in "$@"; do
|
||||
if [ $FOUND_BASEDIR -eq 1 ]; then
|
||||
BASEDIR="$(readlink -m $arg)"
|
||||
if [ ! -d $BASEDIR ]; then
|
||||
i18n_basedir="$BASEDIR"
|
||||
error "missing_basedir"
|
||||
exit 1
|
||||
fi
|
||||
FOUND_BASEDIR=0
|
||||
elif [[ "$arg" = "-f" ]] || [[ "$arg" = "--force" ]]; then
|
||||
info force_flag
|
||||
|
@ -298,9 +293,10 @@ for arg in "$@"; do
|
|||
fi
|
||||
done
|
||||
|
||||
# Still the default BASEDIR, if it doesn't exist we create it as a convenience
|
||||
# Error when the requested basedir (or the default ~/.forgebuild) does not exist
|
||||
if [ ! -d $BASEDIR ]; then
|
||||
echo "ERROR: No such basedir: $BASEDIR. Creating it and aborting"
|
||||
i18n_basedir="$BASEDIR"
|
||||
error "missing_basedir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue