make_cp2k.sh: Avoid expanding unset SPACK_ENV (#5506)

This commit is contained in:
SY Wang 2026-07-01 22:31:07 +08:00 committed by GitHub
parent 14b73dafd1
commit 17c8f72c4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1171,9 +1171,7 @@ if [[ ! -f "${SPACK_BUILD_PATH}/BUILD_DEPENDENCIES_COMPLETED" ]]; then
# Create CP2K environment if needed
if spack env list | grep -q "${CP2K_ENV}"; then
if [[ -n "${SPACK_ENV}" ]]; then
echo "The Spack environment \"${CP2K_ENV}\" exists already"
fi
echo "The Spack environment \"${CP2K_ENV}\" exists already"
else
cat "${CP2K_CONFIG_FILE}"
echo "The Spack environment \"${CP2K_ENV}\" does NOT exist"