macOS Catalina - Terminal Button Always Opens in Home Folder
Asked by Steve King:

I just setup a new computer with macOS Catalina Version 10.15.1

I am running Sourcetree Version 4.0(232)

When I click the Terminal button on the top right, it always opens the terminal in my home folder and NOT the repository working directory.

I thought it was just a bug with the newer version of SourceTree, but I upgraded my old computer to Catalina and the same version of SourceTree, and my old computer opens the terminal in the correct repository directory. I notice that somehow a cd command takes place immediately after the terminal is launched, but my new computer won't do that.

I have compared settings between the two computers, searched everywhere I can find, and I cannot figure out how to get Sourcetree to change directory in the terminal on my new computer.

It's pretty inconvenient to have to cd manually every time I open a terminal window. Help!

Thanks,

Steve


Answers:
author: Mike Dammers
body: This worked for me:

1. Uninstall current version.
2. Install old version (3.2.1) from <https://www.sourcetreeapp.com/download-archives>
3. Press the terminal button and it will ask for folder permissions.
4. After giving the permission, uninstall the old version and install the the latest version again.

comments: author: Steve King
body: Thank you, Mike.


author: Olivier Guilleux
body: Thanks a lot !


author: fernando
body: Obrigado!


author: nfantozz
body: Thanks a lot. This worked for me. Only took about 2 minutes.

1. Downloaded version 3.2.1
2. Extracted and moved the sourcetree.app file to the applications folder and replaced the current one.
3. Opened SourceTree
4. Clicked the terminal icon, it will prompt for permissions. Allow it. ;)
5. Checked for, and updated to 4.0
6. Relaunched.


author: Bestiosfreelancer2
body: Thanks!


author: segur
body: Thanks a lot. But it's not worked for me. :(  
I downgraded to version 3.2.1 and clicked the terminal icon, but it did not prompt for permissions.


author: Steve King
body: Now install the newer version. It should work after that.


author: dmitry1100
body: Thank you, Mike! Your solution with temporary downgrade really works!


author: segur
body: The following steps worked on my Mac.

1. Uninstalled SourceTree 3.2.1
2. Installed SourceTree 2.7.1
3. Installed iTerm2 Build 3.3.9 (the latest version in Homebrew)
4. Clicked the terminal icon, then the permission dialog was displayed.
5. Upgraded to SourceTree 4.0.1

Thanks.


author: segur
body: The following steps worked on my Mac.

1. Uninstalled SourceTree 3.2.1
2. Installed SourceTree 2.7.1 (159)
3. Installed iTerm2 Build 3.3.9 (the latest version in Homebrew)
4. Clicked on the terminal icon, then the permission dialog was displayed.
5. After giving the permission, upgraded to SourceTree 4.0.1 (234).

Thanks.


author: farhan.khan
body: It worked, thanks!


author: PhiFry
body: You don't need to uninstall and reinstall the latest version, just download and extract and run the 3.2.1 version in the downloaded folder and click Terminal and accept permissions, then just delete the 3.2.1 version and continue with the latest as usual.


author: Drenov
body: I was looking for that for a year! Thanks!!


author: Emily Fung
body: Do we know why this bug exists and why Atlassian still not be able to fix it?


author: yuki.mishima
body: 1. Open macOS's ***System Preference***
2. ***Security \& Privacy***
3. ***Privacy*** tab
4. ***Automation*** in the left pane
5. Check ***SourceTree.app*** 's ***Terminal***

comments: author: Steve King
body: I had already solved this a while back, but this looks like it might have worked!


author: PhiFry
body: Sourcetree isnt present there unless youve already accepted permissions in pre 4.0 version. Follow accepted answer instead.


author: Emily Fung
body: I agree with Nguyen, is there an actual fix yet from Atlassian?


author: Ihar_Tsimafeichyk
body: Same issue for me, to make it work I had installed sourcetree older version

comments: author: Steve King
body: I'll have to try that. Thank you!


author: Mikael Nens?n
body: I can't believe this still hasn't been fixed, I've been living with this for ages and just now found the fix because I decided to fix it.


author: Rahul Agrawal
body: Worked for me - had the same trouble after I updated to catalina last night

Installed older version 3.x

Ran the open terminal from sourcetree

gave the permission

close source tree

downloaded the latest version

installed it

Mac blocked the latest version as un trusted.

Gave the permission via security and privacy setting

worked fine

Thanks to all those who contributed here to help.


author: Hieu
body: Same issue. I don't want to reinstall the older version.

comments: author: Steve King
body: It's just a temporary measure. As soon as you install the older version, upgrade to the latest.


author: PhiFry
body: You dont have to uninstall and reinstall/upgrade to latest again, just download and extract 3.2.1 and run it in whatever folder you downloaded it to and click terminal button and delete the 3.2.1 version and continue using the latest.


author: Mike Penz
body: Same issue here


author: Steve King
body: Well it's nice to know I'm not alone, but anybody have any ideas? Is there a way to get support? Does someone knowledgable at Atlassian ever check these boards?


author: Terko
body: Same thing happens to me on Catalina and my new computer. Doesn't happen on old computer on Catalina.


author: daniel.benito
body: Same thing happens to me (same macOS ad SourceTree versions), also, open in terminal is no longer opening a new terminal window when the Terminal is already open.

comments: author: Steve King
body: Same here with not opening a new window when Terminal already open.

Any answer? A solution anybody??


Tags: catalina

mac