Feat: improve robustness of version extraction and update download URL#32
Open
umarijaz04 wants to merge 2 commits intojorcelinojunior:mainfrom
Open
Feat: improve robustness of version extraction and update download URL#32umarijaz04 wants to merge 2 commits intojorcelinojunior:mainfrom
umarijaz04 wants to merge 2 commits intojorcelinojunior:mainfrom
Conversation
Updated the download URL with the current cursor AppImage and changed the flow to retrieve the version, among other enhancements.
|
You could even rely on https://github.com/oslook/cursor-ai-downloads @umarijaz04 |
|
With your changes I got |
Author
|
@Vincent14, https://github.com/oslook/cursor-ai-downloads, I have tried this before, and it is not running on Ubuntu 24.04.2 LTS. It only runs with the no-sandbox flag, which doesn't even connect the accounts. @Vincent14, it works on my end, and I have changed the cursor URL to the latest version. Please see the screenshot below. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This pull request updates the
cursor_setup.shscript to enhance its robustness, improve version extraction, and address edge cases in handling the download URL and file metadata. The key changes include updating URLs and timeout values, refining version extraction logic, and improving fallback mechanisms for remote version and filename retrieval.Updates to constants and configuration:
DOWNLOAD_URLto a more specific production URL and increased theVERSION_CHECK_TIMEOUTfrom 5 seconds to 360 seconds to accommodate slower connections.Improvements to version extraction:
extract_versionfunction to handle variations in filename patterns (e.g., "Cursor-0.49.6" or "cursor_0.49.6") and added a fallback to a default version ("0.49.6") if no version is found.Enhancements to remote version and filename handling:
fetch_remote_versionto extract the filename directly from theDOWNLOAD_URLif HTTP headers do not provide it, and added a fallback to use the basename of theDOWNLOAD_URLwhen filename information is missing.find_local_versionfunction to search for files with a more consistent naming pattern (Cursor-*.AppImageinstead ofcursor-*.AppImage).