Skip to content

Commit

Permalink
Fixing bug while running from superproject working tree
Browse files Browse the repository at this point in the history
  • Loading branch information
juanangp committed May 13, 2022
1 parent de34f61 commit 43df942
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/utils/git_pre-commit.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash

gitCommand=$(git rev-parse --show-superproject-working-tree)
if [ -z $gitCommand ]; then
gitCommand=$(git rev-parse --show-toplevel)
fi

gitPath=$(readlink -f $gitCommand)
reformatCommand="bash $gitPath/scripts/reformat-files.sh"

Expand Down

0 comments on commit 43df942

Please sign in to comment.