From 85e961250622bbac734e85c78ecab7422abe086f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:06:36 +0000 Subject: [PATCH] fix: compile_config.js should skip when YAML file not found instead of failing Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- packages/backend/scripts/compile_config.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/backend/scripts/compile_config.js b/packages/backend/scripts/compile_config.js index 63311df1ae..7399a67b71 100644 --- a/packages/backend/scripts/compile_config.js +++ b/packages/backend/scripts/compile_config.js @@ -27,18 +27,17 @@ const OUTPUT_PATH = resolve(configDir, '.config.json'); */ function yamlToJson(ymlPath) { if (!fs.existsSync(ymlPath)) { - console.warn(`YAML file not found: ${ymlPath}`); - process.exit(1); + console.log(`skipped: ${ymlPath} is not found`); + return; } - console.log(`${ymlPath} → ${OUTPUT_PATH}`); - const yamlContent = fs.readFileSync(ymlPath, 'utf-8'); const jsonContent = yaml.load(yamlContent); fs.writeFileSync(OUTPUT_PATH, JSON.stringify({ '_NOTE_': 'This file is auto-generated from YAML file. DO NOT EDIT.', ...jsonContent, }), 'utf-8'); + console.log(`✓ ${ymlPath} → ${OUTPUT_PATH}`); } if (process.env.MISSKEY_CONFIG_YML) { @@ -48,4 +47,4 @@ if (process.env.MISSKEY_CONFIG_YML) { yamlToJson(resolve(configDir, process.env.NODE_ENV === 'test' ? 'test.yml' : 'default.yml')); } -console.log('Configuration compiled ✓'); +console.log('Configuration compiled');