Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-5856

git-flow fails if app is located in directory with spaces

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • None
    • 2.7.6
    • Git
    • Severity 2 - Major

      If the SourceTree app is located in a directory that contains spaces the git-flow features don't work. You get various error messages, e.g. when trying to start a new release.

      In ~/.gitflow_export there's a path from SourceTree without double-quotes. I added them, but there's still various errors caused by "SourceTree.app/Contents/Resources/git_local/gitflow/gitflow-shFlags".

      Moving SourceTree into another directory (like /Applications) works around this but I would have preferred to keep it in my user's directory (which has spaces).

       

            [SRCTREE-5856] git-flow fails if app is located in directory with spaces

            Issue fixed in 4.2.5. Kindly upgrade the Sourcetree Version and verify.

            Arati Mohanty added a comment - Issue fixed in 4.2.5. Kindly upgrade the Sourcetree Version and verify.

            Quoting various env variables helped me workaround this issue

            cat ~/.gitflow_export
            export FLAGS_GETOPT_CMD="/Applications/untitled folder/Sourcetree.app/Contents/Resources/bin/getopt"

             

            cat "/Applications/untitled folder/Sourcetree.app/Contents/Resources/bin/getopt"
            #!/bin/bash

            1. Simple getopt replacement using bash script function: https://github.com/agriffis/pure-getopt/blob/master/getopt.bash

            top=${0%/*}
            . "${top}/getopt.bash"

            getopt $*

             

            And then quoting every "${FLAGS_GETOPT_CMD}" in "/Applications/untitled folder/Sourcetree.app/Contents/Resources/git_local/gitflow/gitflow-shFlags"

             

            jeanmatthieu added a comment - Quoting various env variables helped me workaround this issue cat ~/.gitflow_export export FLAGS_GETOPT_CMD="/Applications/untitled folder/Sourcetree.app/Contents/Resources/bin/getopt"   cat "/Applications/untitled folder/Sourcetree.app/Contents/Resources/bin/getopt" #!/bin/bash Simple getopt replacement using bash script function: https://github.com/agriffis/pure-getopt/blob/master/getopt.bash top=${0%/*} . "${top}/getopt.bash" getopt $*   And then quoting every "${FLAGS_GETOPT_CMD}" in "/Applications/untitled folder/Sourcetree.app/Contents/Resources/git_local/gitflow/gitflow-shFlags"  

              2566180e0bc8 Arati Mohanty
              8dee5cc6ccf1 Marc Haisenko
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: