From a7c29c9d17e8420d6fd222ce7a9ee481b29dad37 Mon Sep 17 00:00:00 2001 From: Andrey Talman Date: Thu, 27 Jun 2024 13:00:28 -0400 Subject: [PATCH] Fix crash when PYTORCH_VERSION is not defined --- packaging/pre_build_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/pre_build_script.sh b/packaging/pre_build_script.sh index 1690c62750..cbc065bf11 100644 --- a/packaging/pre_build_script.sh +++ b/packaging/pre_build_script.sh @@ -10,7 +10,7 @@ set -eux echo "This script is run before building torchao binaries" python -m pip install --upgrade pip -if [ -z "$PYTORCH_VERSION" ]; then +if [ -z ${PYTORCH_VERSION:-} ]; then PYTORCH_DEP="torch" else PYTORCH_DEP="torch==$PYTORCH_VERSION"