Skip to content

Commit b854c2f

Browse files
committed
tests: fixed an issue with retrieval of the squashfuse repo
During tests local instance of snapd is populated to VM without `.git` folders. In case squashfuse is already populated within the local instance, the `vendor.sh` script fails to checkout a certain commit. The checkout now checks first that `.git` exists, otherwise is assumes that populated squashfuse is correct. Signed-off-by: Arseniy Aharonov <[email protected]>
1 parent 47b19f2 commit b854c2f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: c-vendor/vendor.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ set -e
77
if [ ! -d ./squashfuse ]; then
88
git clone https://github.com/vasi/squashfuse
99
fi
10+
1011
# This is just tip/master as of Aug 30th 2021, there is no other
1112
# specific reason to use this. It works with both "libfuse-dev" and
1213
# "libfuse3-dev" which is important as 16.04 only have libfuse-dev
1314
# and 21.10 only has libfuse3-dev
14-
(cd squashfuse && git checkout 74f4fe86ebd47a2fb7df5cb60d452354f977c72e)
15+
if [ -d ./squashfuse/.git ]; then
16+
(cd squashfuse && git checkout 74f4fe86ebd47a2fb7df5cb60d452354f977c72e)
17+
fi
1518

0 commit comments

Comments
 (0)