• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 3.0.17
    • Git
    • Severity 2 - Major

      Scoop is a command line installer for Windows, think apt-get but for Windows. I used it to install `git`, and then Sourcetree. On installation, Sourcetree unfortunately misidentifies the location of git.exe:

      There is no `cmd` folder under `scoop`:

      But there is a `cmd/git.exe` in `C:\Users\Jan\scoop\apps\git\current\cmd`:

      Seems the installer is somehow using a a wrong path, and then adding `cmd/git.exe` to it. Maybe because Scoop is installing a shim for git in `C:\Users\Jan\scoop\shims\git.exe`? Go a folder back, then add `cmd/git.exe` and you have the wrong path.

      Here is a GitHub issue on the scoop bucket that contains Sourcetree: https://github.com/lukesampson/scoop-extras/issues/1674 In there I collected some links to other issues on GitHub but also in the Atlassian Community, that helped me understand the issue and also provides a workaround by manually editing the path in the Sourcetree configuration.

            [SRCTREEWIN-11329] SourceTree misidentifies git installed via scoop

            JD Evora added a comment - - edited

            I created the following script to get around the issue 

             

            add_scoop_bucked extras
            $gitLocalPath = "$HOME\AppData\Local\Atlassian\SourceTree\git_local"
            $gitCurrentPath = "$HOME\Scoop\apps\git\current"
            # Create intermediate directories if they don't exist
            New-Item -ItemType Directory -Path (Split-Path $gitLocalPath) -Force | Out-Null
            
            #Check if the symbolic link already exists
            if (!(Test-Path -Path $gitLocalPath)) {
                # Create the symbolic link
                cmd /c mklink /J $gitLocalPath $gitCurrentPath
            } 
            scoop install sourcetree 

             

            JD Evora added a comment - - edited I created the following script to get around the issue    add_scoop_bucked extras $gitLocalPath = "$HOME\AppData\Local\Atlassian\SourceTree\git_local" $gitCurrentPath = "$HOME\Scoop\apps\git\current" # Create intermediate directories if they don't exist New-Item -ItemType Directory -Path (Split-Path $gitLocalPath) -Force | Out-Null #Check if the symbolic link already exists if (!(Test-Path -Path $gitLocalPath)) {     # Create the symbolic link     cmd /c mklink /J $gitLocalPath $gitCurrentPath }  scoop install sourcetree  

            janpio added a comment -

            Attention, those attachments @Edgar Brown uploaded here are spam and should be ignored and/or deleted. Bugger off.

            janpio added a comment - Attention, those attachments @Edgar Brown uploaded here are spam and should be ignored and/or deleted. Bugger off.

              Unassigned Unassigned
              3988ff1fde0b janpio
              Affected customers:
              3 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated: