-
Notifications
You must be signed in to change notification settings - Fork 102
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
#1153 : improve offline capability #1364
#1153 : improve offline capability #1364
Conversation
…adjusted the conditions for executing the functions doGitPullOrClone, DoUpdateUrls and doDownload when user is online, otherwise skip these functions. Signed-off-by: diiinesh <[email protected]>
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.
Looks good to me.
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.
@diiinesh thanks for your PR. Your function doCheckNetworkStatus
looks perfect and you also properly documented it.
However, for the integration of the checks we need to adjust. I added comments to explain why the current approach is not working correctly.
My suggestion would be:
doGitPullOrClone
: if repo is already there and pull fails, then add adoCheckNetworkStatus
and if offline log a warning that the repo could not be updated because we are offline and return (continue flow)doInstall
: if software is already installed (maybe in a different version), then add adoCheckNetworkStatus
and if offline log a warning that we cannot install update because we are offline and return (if${version}
was given per arg and matches.ide.software.version
we should even suppress the check and the warning and then there is nothing to do anyways and also no problem if we are offline).
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.
@diiinesh thanks for your update. Looks sane to me now. 👍
It is still a little different to the behavior of IDEasy but fine to be merged.
fixes #1153
Added function: doCheckNetworkStatus()
adjusted function: doInstall()
If system is offline, skip these functions.