-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add Node Version Error Handling #159
Conversation
pynecone/utils.py
Outdated
) | ||
# The output will be in the form "vX.Y.Z", so we can split it on the "v" character and take the second part | ||
version = result.stdout.decode().strip().split("v")[1] | ||
# Split the version string on the "." character and convert each part to an integer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right here I think you can just
return version.split(".") > min_version.split(".")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good catch, gpt complicated it
["node", "-v"], stdout=subprocess.PIPE, stderr=subprocess.PIPE | ||
) | ||
# The output will be in the form "vX.Y.Z", so we can split it on the "v" character and take the second part | ||
version = result.stdout.decode().strip().split("v")[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this line either if we don't cast to int
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually need this line because the output has v
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet
No description provided.