Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

fix: ensure Python 3.11 >= requirement is met for create-venv.sh #13

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

cmacrae
Copy link
Contributor

@cmacrae cmacrae commented Apr 29, 2024

Copy link

vercel bot commented Apr 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
scaffold-nillion ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 7:57am

required_version="3.11"
current_version=$(python3 --version | cut -d ' ' -f2)
PYTHON_MAJOR_MINOR_VERSION=$(echo $current_version | cut -d '.' -f1,2)
if ! printf '%s\n' "$required_version" "$current_version" | sort -V | head -n 1 | grep -qx "$required_version"; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what's going on on this line because I'm wondering if it can simplified with if [ "$required_version" != "$PYTHON_MAJOR_MINOR_VERSION" ]?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nevermind. I think the error message below clarifies it. It's the "or higher" part that does it.

@cmacrae cmacrae requested a review from oceans404 April 29, 2024 08:57
@oceans404 oceans404 merged commit 557b9d7 into main Apr 29, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants