okay
This commit is contained in:
parent
5f6c48485d
commit
b656f770bc
1 changed files with 5 additions and 3 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue