Skip to content
Snippets Groups Projects
Commit 6909ac8d authored by Don March's avatar Don March
Browse files

Fix git version parsing when there are spaces

parent 8ae70a31
No related branches found
No related tags found
No related merge requests found
......@@ -476,7 +476,7 @@ write_gitignore() {
use
cd "$VCSH_BASE" || fatal "could not enter '$VCSH_BASE'" 11
local GIT_VERSION=$(git --version)
local GIT_VERSION="$(git --version)"
local GIT_VERSION_MAJOR=$(echo $GIT_VERSION | sed -n 's/.* \([0-9]\)\..*/\1/p')
local GIT_VERSION_MINOR=$(echo $GIT_VERSION | sed -n 's/.* \([0-9]\)\.\([0-9]\)\..*/\2/p')
OLDIFS=$IFS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment