Skip to content
Browse files

Oops, forgot about spaces in the dirname.

Quite likely for Windows users to hit this problem.
  • Loading branch information...
1 parent 4b9545e commit 5e8cc9fceb509848dee2cd62e98aadc29ffa146b @nvie committed Dec 1, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 git-flow
2 git-flow
@@ -44,7 +44,7 @@ fi
# The sed expression here replaces all backslashes by forward slashes.
# This helps our Windows users, while not bothering our Unix users.
-export GITFLOW_DIR=$(dirname $(echo "$0" | sed -e 's,\\,/,g'))
+export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
usage() {
echo "usage: git flow <subcommand>"

3 comments on commit 5e8cc9f

mhart commented on 5e8cc9f Dec 1, 2011

I'm not so sure about the "not bothering our Unix users" bit - there's the extra overhead of calling out to sed, and anyone with a backslash in their directories will have it replaced (this will be very rare I realise).

What's the issue with checking for the OS?

nvie commented on 5e8cc9f Dec 1, 2011

The main issue is that there doesn't seem to be a reliable way of doing so. uname is the standard way of doing this, but it is missing on the Windows platform. (Although the lack of uname could well imply we're on Windows, LOL.)

The extra sed call being "overhead" is not a very useful discussion. Tens of sed are done under the cover already with day-to-day use of git-flow. Degraded performance ain't an interesting con-argument, especially not in the context of this discussion.

mhart commented on 5e8cc9f Dec 1, 2011

Fair enough then.

Please sign in to comment.
Something went wrong with that request. Please try again.