Skip to content

Commit

Permalink
Fix compile error on Windows (WSL) due to carriage returns in git out…
Browse files Browse the repository at this point in the history
  • Loading branch information
hansec authored Aug 28, 2024
1 parent 1789073 commit 66f38de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/include/create_git_header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
HAVE_GIT=$(git status 1>/dev/null 2>&1; echo $?)
if [[ "${HAVE_GIT}" -eq 0 ]]
then
GITBRANCH=$(git branch | grep "*" | sed "s/* //" | sed "s/ /_/g" | sed -e "s/[()]//g")
GITVERSION=$(git rev-parse --short HEAD)
GITBRANCH=$(git branch | grep "*" | sed "s/* //" | sed "s/ /_/g" | sed -e "s/[()]//g" | sed 's/\r//g')
GITVERSION=$(git rev-parse --short HEAD | sed 's/\r//g')
else
GITBRANCH=unknown
GITVERSION=unknown
Expand Down

0 comments on commit 66f38de

Please sign in to comment.