fork-dev / Tracker

Bug and issue tracker for Fork for Mac
510 stars 12 forks source link

Misleading message when xcode cli tools aren't installed #684

Open maksimovic opened 5 years ago

maksimovic commented 5 years ago

For example, after an upgrade of MacOS, xcode cli tools need to be (re)installed. However, before that you can run into an issue with Fork because it will throw a message that directory you're trying to open is not a git repo, offering you to initialize one (sorry no screenshot, forgot to take it as I was battling the issue).

Also, re-scanning the main repo dir always comes up with empty results, although projects/repos are there.

I've found this in fork.log:

πŸ“’> XCGLogger Version: 7.0.0 - Level: Debug
πŸ“’> XCGLogger writing log to: file:///Users/oliver/Library/Caches/Fork/fork.log
πŸ“’[AppDelegate.swift:107] applicationDidFinishLaunching(_:) > Git instance: system
πŸ“’[RemoteServiceNotificationManager.swift:73] stop() > Stop checking GitHub notifications
πŸ“’[RemoteServiceNotificationManager.swift:48] start() > Start checking GitHub notifications
❗️[ForkDocument.swift:33] read(from:ofType:) > gitUnknownError(output: "", error: "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun\n")
❗️[ForkDocument.swift:33] read(from:ofType:) > gitUnknownError(output: "", error: "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun\n")

It could be nice to know the reason why something fails in this case, because this sent me in a completely wrong direction while trying to figure out what's wrong.

Only after isolating the issue to Fork (everything else kept working as intended, like IDE etc), I went to check the log and found the offending error 😁

DanPristupov commented 5 years ago

The solution could be to use the embedded git instance in Fork, which is the default behavior.