kas-container: Add check for KAS_REPO_REF_DIR
Check if KAS_REPO_REF_DIR exists to avoid an error during the execution of readlink. Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
9b9bb00c56
commit
2c0486d846
@ -399,6 +399,10 @@ if [ -n "${SSTATE_DIR}" ]; then
|
||||
fi
|
||||
|
||||
if [ -n "${KAS_REPO_REF_DIR}" ]; then
|
||||
if [ ! -d "${KAS_REPO_REF_DIR}" ]; then
|
||||
echo "Passed KAS_REPO_REF_DIR '${KAS_REPO_REF_DIR}' is not a directory"
|
||||
exit 1
|
||||
fi
|
||||
set -- "$@" \
|
||||
-v "$(readlink -f "${KAS_REPO_REF_DIR}")":/repo-ref:ro \
|
||||
-e KAS_REPO_REF_DIR=/repo-ref
|
||||
|
Loading…
Reference in New Issue
Block a user