Skip to content

Commit d24a7b3

Browse files
authored
fix(install) Make wal2json copy more robust (#1024)
There is a potential conrner case where we may end up with the wal2json library in the `postgres/wal2json/VERSION/file` but not in `postgres/wal2json/wal2json.so`. Not sure exactly how likely this could be, but thechnically it is possible that the download succeeds and `cp "../postgres/wal2json/$VERSION/$FILE_NAME" "$FILE_TO_USE"` does not. The next attempt the copy would not be attempted. This fix ensures the copy always happens
1 parent 66e1820 commit d24a7b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

install/install-wal2json.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ if [ ! -f "../postgres/wal2json/$VERSION/$FILE_NAME" ]; then
2727
$DOCKER_CURL -L \
2828
"https://github.com/getsentry/wal2json/releases/download/$VERSION/$FILE_NAME" \
2929
> "../postgres/wal2json/$VERSION/$FILE_NAME"
30-
31-
cp "../postgres/wal2json/$VERSION/$FILE_NAME" "$FILE_TO_USE"
32-
fi
30+
fi
31+
cp "../postgres/wal2json/$VERSION/$FILE_NAME" "$FILE_TO_USE"
32+
3333

3434
echo "${_endgroup}"

0 commit comments

Comments
 (0)