From: Shane Jaroch Date: Sat, 17 Jan 2026 13:33:19 +0000 (-0500) Subject: fixup! lint/cubic X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;ds=inline;p=gamesguru%2Fgit-remote-gcrypt.git fixup! lint/cubic --- diff --git a/tests/system-test-multikey.sh b/tests/system-test-multikey.sh index ccba68c..213cde6 100755 --- a/tests/system-test-multikey.sh +++ b/tests/system-test-multikey.sh @@ -85,6 +85,8 @@ export HOME="${tempdir}" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" repo_root="$(dirname "$SCRIPT_DIR")" test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test") +# Escape special chars for sed (delimiter /, &, and backslash) +test_version=$(printf '%s\n' "$test_version" | sed 's:[&/\]:\\&:g') cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt" sed "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt" >"$tempdir/git-remote-gcrypt.tmp" mv "$tempdir/git-remote-gcrypt.tmp" "$tempdir/git-remote-gcrypt" diff --git a/tests/system-test-privacy-leaks.sh b/tests/system-test-privacy-leaks.sh index 5df0d8f..5e0c099 100755 --- a/tests/system-test-privacy-leaks.sh +++ b/tests/system-test-privacy-leaks.sh @@ -18,6 +18,8 @@ export HOME="${tempdir}" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" repo_root="$(dirname "$SCRIPT_DIR")" test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test") +# Escape special chars for sed (delimiter /, &, and backslash) +test_version=$(printf '%s\n' "$test_version" | sed 's:[&/\]:\\&:g') cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt" sed "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt" >"$tempdir/git-remote-gcrypt.tmp" mv "$tempdir/git-remote-gcrypt.tmp" "$tempdir/git-remote-gcrypt" diff --git a/tests/system-test-repack.sh b/tests/system-test-repack.sh index db176a6..72f8c89 100755 --- a/tests/system-test-repack.sh +++ b/tests/system-test-repack.sh @@ -50,6 +50,8 @@ export HOME="${tempdir}" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" repo_root="$(dirname "$SCRIPT_DIR")" test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test") +# Escape special chars for sed (delimiter /, &, and backslash) +test_version=$(printf '%s\n' "$test_version" | sed 's:[&/\]:\\&:g') cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt" sed -i "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt" chmod +x "$tempdir/git-remote-gcrypt" diff --git a/tests/system-test.sh b/tests/system-test.sh index d5471d7..11c763c 100755 --- a/tests/system-test.sh +++ b/tests/system-test.sh @@ -77,6 +77,8 @@ export HOME="${tempdir}" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" repo_root="$(dirname "$SCRIPT_DIR")" test_version=$(git describe --tags --always --dirty 2>/dev/null || echo "test") +# Escape special chars for sed (delimiter /, &, and backslash) +test_version=$(printf '%s\n' "$test_version" | sed 's:[&/\]:\\&:g') cp "$repo_root/git-remote-gcrypt" "$tempdir/git-remote-gcrypt" sed "s/@@DEV_VERSION@@/$test_version/" "$tempdir/git-remote-gcrypt" > "$tempdir/git-remote-gcrypt.tmp" mv "$tempdir/git-remote-gcrypt.tmp" "$tempdir/git-remote-gcrypt"