Skip to content

Commit 3d906f3

Browse files
authored
Fix "ambiguous argument 'head'" error in test script and make future (#151)
errors fatal.
1 parent 6296f90 commit 3d906f3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

script/parse-examples

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
set -e
3+
set -eu
44

55
cd "$(dirname "$0")/.."
66

@@ -16,7 +16,8 @@ function clone_repo {
1616
fi
1717

1818
pushd "$path" > /dev/null
19-
if [ "$(git rev-parse head)" != "$sha" ]; then
19+
actual_sha=$(git rev-parse HEAD)
20+
if [ "$actual_sha" != "$sha" ]; then
2021
echo "Updating $owner/$name to $sha"
2122
git fetch
2223
git reset --hard $sha

0 commit comments

Comments
 (0)