diff --git a/scripts/setup-config.js b/scripts/setup-config.js index 9e7d325..9139c36 100644 --- a/scripts/setup-config.js +++ b/scripts/setup-config.js @@ -8,8 +8,9 @@ const fs = require('fs') const path = require('path') -const configPath = path.join(__dirname, 'src', 'config', 'config.json') -const examplePath = path.join(__dirname, 'src', 'config', 'config.json.example') +const projectRoot = path.join(__dirname, '..') +const configPath = path.join(projectRoot, 'src', 'config', 'config.json') +const examplePath = path.join(projectRoot, 'src', 'config', 'config.json.example') // Check if config.json exists if (fs.existsSync(configPath)) { @@ -19,7 +20,7 @@ if (fs.existsSync(configPath)) { // Check if example exists if (!fs.existsSync(examplePath)) { - console.error('✗ config.json.example not found') + console.error('✗ config.json.example not found at', examplePath) process.exit(1) } @@ -33,3 +34,4 @@ try { console.error('✗ Failed to create config.json:', err.message) process.exit(1) } +