Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
60c3e7b
fix(cli): don't crash startup when the output-language file is unwrit…
qwen-code-dev-bot Aug 29, 2026
ad6be96
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Aug 29, 2026
9e7ee5f
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Aug 29, 2026
71a8a44
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Aug 29, 2026
b43c7ed
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Aug 29, 2026
1938350
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Aug 30, 2026
1b26a76
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Aug 31, 2026
c3ea344
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Aug 31, 2026
dd8a8c5
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 1, 2026
0544a11
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 1, 2026
467a4ca
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 2, 2026
edcdc23
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 2, 2026
861523b
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 3, 2026
34d61eb
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 4, 2026
d52201b
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 5, 2026
1a38d19
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 5, 2026
3068612
Merge branch 'main' into autofix/issue-10453
wenshao Sep 6, 2026
c10713e
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 6, 2026
b8a0ca2
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 7, 2026
fb39788
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 8, 2026
f214690
Merge branch 'main' into autofix/issue-10453
yiliang114 Sep 8, 2026
b734ebe
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 9, 2026
be28c6f
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 9, 2026
82e4f7f
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 10, 2026
2b1af15
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 10, 2026
b8524af
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 11, 2026
f6d3cef
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 12, 2026
b5fda5a
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 13, 2026
f92ecc8
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 13, 2026
94cd46a
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 14, 2026
175d4e0
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 15, 2026
5a802f9
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 16, 2026
0ac7348
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 17, 2026
ea1c426
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 18, 2026
4d22866
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 18, 2026
4357034
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 19, 2026
6f7ddd9
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 20, 2026
565cfd7
Merge branch 'main' into autofix/issue-10453
qwen-code-dev-bot Sep 21, 2026
51e986a
Merge branch 'main' into autofix/issue-10453
yiliang114 Sep 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/cli/src/i18n/languageUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,15 @@ Always use formal tone.
expect(() => initializeLlmOutputLanguage('auto')).not.toThrow();
});

it('should not throw when the rule file cannot be created', () => {
vi.mocked(fs.existsSync).mockReturnValue(false);
vi.mocked(fs.mkdirSync).mockImplementation(() => {
throw new Error('EACCES: permission denied');
});

expect(() => initializeLlmOutputLanguage()).not.toThrow();
});

it('should normalize Chinese locale and create Chinese rule file', () => {
vi.mocked(fs.existsSync).mockReturnValue(false);

Expand Down
7 changes: 6 additions & 1 deletion packages/cli/src/i18n/languageUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,5 +319,10 @@ export function initializeLlmOutputLanguage(outputLanguage?: string): void {

// File doesn't exist or has invalid content, create it with configured language behavior
const resolved = resolveOutputLanguageOrPreserveAuto(outputLanguage);
writeOutputLanguageFile(resolved);
try {
writeOutputLanguageFile(resolved);
} catch {
// Creation is best-effort, like the migration above: the rule file is
// advisory, so an unwritable global dir must not crash startup.
}
}
Loading