-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
check for different urls when running haxelib git
#640
base: development
Are you sure you want to change the base?
check for different urls when running haxelib git
#640
Conversation
how was this one looking? Should I add tests for this? |
Yes please, a test would be useful! |
It only has to be checked when running interp scripts, so we can avoid checking it in other cases.
…ion#638) * submodule stuff in progress * perhaps a submodule fix? * revert the dipshit logging * update run.n * we dont need to spit out every log, but we should use the threads? * comment out the unneeded git fetch * small reorder / remove redundant `git submodule init` * uncomment the lib deletion, since we've ran into issues related * fix for stderr/stdout related hangs on non-windows when installing git submodules * remove git progress code * run.n * remove whitespace * proper non-cli coupled logging * remove unneeded logging/git --quiet flag code for the time being * run.n * remove unneeded FsUtils.deleteRec() * run.n * remove testing print * run.n * removed unused import and throw an exception on submodule error * add message for SubmoduleError
…cal or not testing in progress accident git thingie
089b365
to
da51ad0
Compare
finally got around to figuring out how to draft up a test! I wrote it in |
|
||
if (url != null && libUrl != null && url != libUrl) | ||
{ | ||
if (!userInterface.confirm('Update remote url: "${libUrl}" with "${url}"')) { |
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.
This introduces a new cli interaction that wasn't present before, it may be best to simply overwrite unless there are uncommitted changes.
Currently running
haxelib git
it doesn't check the differences in remote urls.Running
haxelib git flixel https://github.com/HaxeFlixel/flixel.git
will correctly installflixel
. However, if you then try running with a different urlhaxelib git flixel https://github.com/FunkinCrew/flixel.git
it doesn't properly update / reinstall from the new URL. Going into the cloned repoflixel/git
and runninggit config --get remote.origin.url
will showhttps://github.com/HaxeFlixel/flixel.git
rather than the new one.This PR runs a check from the currently installed haxelib's git remote to the newly inputted one, and if it's different, it will ask if you want to install the new one.
Right now I just have it implemented for git, not mecurial. Current implementation is agnostic to whether someone has an SSH remote url (
git@github.com:HaxeFlixel/flixel
) or HTTP remote url (https://github.com/HaxeFlixel/flixel
)