Bugfix to avoid errors due to Git subcommands returning ANSI color output.
diff --git a/git-flow-release b/git-flow-release
index b998673..443dd40 100644
--- a/git-flow-release
+++ b/git-flow-release
@@ -70,7 +70,7 @@
exit 0
fi
- current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
+ current_branch=$(git branch --color=never | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
short_names=$(echo "$release_branches" | sed "s ^$PREFIX g")
# determine column width first
@@ -132,7 +132,7 @@
}
require_base_is_on_develop() {
- if ! git branch --contains "$BASE" 2>/dev/null \
+ if ! git branch --color=never --contains "$BASE" 2>/dev/null \
| sed 's/[* ] //g' \
| grep -q "^$DEVELOP_BRANCH\$"; then
die "fatal: Given base '$BASE' is not a valid commit on '$DEVELOP_BRANCH'."