duneci-install-module: HEAD might not be a symbolic ref

This might happen, for example, when a tag is requested via
parent 7c7ca904
Pipeline #805 passed with stages
in 68 minutes and 57 seconds
...@@ -74,7 +74,7 @@ opts="${DUNECI_OPTS:-/duneci/opts.gcc}" ...@@ -74,7 +74,7 @@ opts="${DUNECI_OPTS:-/duneci/opts.gcc}"
( (
cd "${module}" cd "${module}"
git_branch=$(git symbolic-ref HEAD) git_branch=$(git symbolic-ref HEAD 2>/dev/null || echo "(unknown)")
git_branch="${git_branch#refs/heads/}" git_branch="${git_branch#refs/heads/}"
echo echo
echo "Installing ${module}; branch ${git_branch}" echo "Installing ${module}; branch ${git_branch}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment