imagej / imagej-updater

The automatic updater for ImageJ
Other
12 stars 15 forks source link

The updater needs git? #84

Closed haesleinhuepf closed 2 years ago

haesleinhuepf commented 4 years ago

Hi all, hi @frauzufall

I'm just updating a fresh Fiji on a fresh MacOS and it asks me to install git. Just wondering, is this intentional? If yes, Why? What is git doing in the background?

DSC_1798

Thanks!

Cheers, Robert

frauzufall commented 4 years ago

What? Sorry, I have no idea where this comes from. The latest updater release is from September. We just tested a fresh Fiji and the updater on Gaby's Mac a few days ago and everything was fine. Sorry, might not be able to have a closer look before Monday.

EDIT There seems to be a git call here... I did not know about this and would have to dig deeper to know when / in which cases it is executed exactly. I also never tried the updater on a device without git..

haesleinhuepf commented 4 years ago

Could be an old issue... No hurry 😉

https://github.com/imagej/imagej-updater/blob/ab983dbd6c34dcf7ac2a4b85e857b0c0826db970/src/main/java/net/imagej/updater/Diff.java#L272

imagesc-bot commented 2 years ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/why-does-fiji-require-git-command-line-tools/65115/2

imagejan commented 2 years ago

I've seen this dialog only on macOS systems so far. The "updating" functionality of the updater is not affected when cancelling the dialog.

I'd suggest implementing a check for the presence of git and pass silently (or give a more informative message) when it's absent, instead of letting macOS handle it.

ctrueden commented 2 years ago

@imagejan wrote:

I'd suggest implementing a check for the presence of git

Yeah. The problem is: just invoking git to see whether it's present itself triggers the dialog. Thanks, Apple.

So I'm refactoring the Updater now to avoid invoking git ever until the last possible moment when it is actually needed.

ctrueden commented 2 years ago

Bug fixed in imagej/imagej-ui-swing@cfaf9e35.

I also uploaded a new imagej-ui-swing snapshot build to the update site. Please update your Fiji on an affected system and reopen this issue if the problem still persists.

P.S. While at it, I also added a system property imagej.updater.git.command which, when set, is used to call out to git, rather than using only git on the system path.

P.P.S. While at it, I also uploaded the newly released ImageJ 1.53q.

imagesc-bot commented 2 years ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/why-does-fiji-require-git-command-line-tools/65115/3