This commit is contained in:
headpatsyou 2026-01-08 18:39:19 +00:00
parent 5f6c48485d
commit b656f770bc

View file

@ -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)
}