Skip to content

Commit 193bac1

Browse files
committed
fix: don't close user's terminal on invalid platform
Use `return 1` instead of `exit 1` so that sourcing the script with an invalid platform prints the error without killing the shell. Fixes #305
1 parent 8d37acd commit 193bac1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

uv_env_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ elif [ "$PLATFORM" == "cu121" ]; then
3030
PYG_URL="https://data.pyg.org/whl/torch-${TORCH_VER}+cu121.html"
3131
else
3232
echo "❌ Error: Invalid platform '$PLATFORM'. Use: cpu, cu118, or cu121."
33-
exit 1
33+
return 1 2>/dev/null || exit 1
3434
fi
3535

3636
echo "⚙️ Updating pyproject.toml..."

0 commit comments

Comments
 (0)