Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants