Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

fix: fail the English-only check on git grep errors

jeffrey4839b91a04c8
diff --git a/apps/voice-runtime/src/live-worker.test.ts b/apps/voice-runtime/src/live-worker.test.ts
index 4058a8b8..96822781 100644
--- a/apps/voice-runtime/src/live-worker.test.ts
+++ b/apps/voice-runtime/src/live-worker.test.ts
@@ -416,7 +416,12 @@ describe("afterCall", () => {
expect(
afterCall("Switching everything to English.", "All English now"),
).toBe(" All English now");
- expect(afterCall("改好了。", "主题是周五会议")).toBe("主题是周五会议");
+ expect(
+ afterCall(
+ "\u6539\u597d\u4e86\u3002",
+ "\u4e3b\u9898\u662f\u5468\u4e94\u4f1a\u8bae",
+ ),
+ ).toBe("\u4e3b\u9898\u662f\u5468\u4e94\u4f1a\u8bae");
expect(afterCall("", "Done.")).toBe("Done.");
expect(afterCall("Done. ", "Next")).toBe("Next");
});
diff --git a/docs/desktop-release.md b/docs/desktop-release.md
index 16624596..20869cde 100644
--- a/docs/desktop-release.md
+++ b/docs/desktop-release.md
@@ -144,8 +144,9 @@ program of that version.
## Packaging Details
Paths in this section are relative to `apps/desktop/`, except
-`scripts/prepare-native-*.mjs`, `scripts/source-native.mjs`, and
-`scripts/installs/`, which are in the repository root.
+`scripts/prepare-native-*.mjs`, `scripts/source-native.mjs`,
+`scripts/installs/`, and `packages/local-installation/`, which are in the
+repository root.
### Source Package
diff --git a/scripts/ci/check-repository-gate.sh b/scripts/ci/check-repository-gate.sh
index 811ec189..5b999881 100755
--- a/scripts/ci/check-repository-gate.sh
+++ b/scripts/ci/check-repository-gate.sh
@@ -63,10 +63,18 @@ fi
# The repository is English-only. Only CJK ideographs are rejected, so tests
# may still use kana, Hangul, and full-width punctuation as unspaced scripts.
-if ((${#changed_files[@]} > 0)) &&
- LC_ALL=C git grep -nIP '(*UTF)[\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F900}-\x{FAFF}]' -- "${changed_files[@]}"; then
- echo "Changed files contain Chinese characters; the repository is English-only (see AGENTS.md)." >&2
- exit 1
+# git grep exits 1 when nothing matches; any other non-zero status is an error
+# (for example a git without PCRE), which must fail the gate rather than pass it.
+if ((${#changed_files[@]} > 0)); then
+ cjk_status=0
+ LC_ALL=C git grep -nIP '(*UTF)[\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F900}-\x{FAFF}]' -- "${changed_files[@]}" || cjk_status=$?
+ if ((cjk_status == 0)); then
+ echo "Changed files contain Chinese characters; the repository is English-only (see AGENTS.md)." >&2
+ exit 1
+ elif ((cjk_status != 1)); then
+ echo "The English-only check could not run (git grep exited $cjk_status)." >&2
+ exit 1
+ fi
fi
make check-scripts-fast check-docs