Skip to content

feat: Inform user if cli is outdated#81

Open
prateek-who wants to merge 1 commit intoMorpheApp:devfrom
prateek-who:update-alert
Open

feat: Inform user if cli is outdated#81
prateek-who wants to merge 1 commit intoMorpheApp:devfrom
prateek-who:update-alert

Conversation

@prateek-who
Copy link
Contributor

Check the user's version with the latest stable version to see if the user's version is outdated. Currently it only runs with the patch subcommand and the network connection has a 3 sec TTL. Any errors are silently thrown and the patching continues. Do we reduce the TTL or is this fine?

It is running on the main thread itself, but it'll block it max for 3 seconds. In case there are any issues with this implementation, please let me know. I'll make the changes

@LisoUseInAIKyrios
Copy link
Contributor

3 second timeout is ok. It's only a courtesy check and not critical.

The check could run on a background thread so there is no delay before patching starts, but that will cause the console log "cli is outdated" message to appear in a non-deterministic ordering. Sometimes it will be the first line, sometimes mixed in with other patcher log statements. I think how it is now (blocks to check if outdated) is ok because in normal conditions the check will be a fraction of a second.

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.

2 participants