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 fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
const configPath = path.join(__dirname, 'src', 'config', 'config.json')
|
const projectRoot = path.join(__dirname, '..')
|
||||||
const examplePath = path.join(__dirname, 'src', 'config', 'config.json.example')
|
const configPath = path.join(projectRoot, 'src', 'config', 'config.json')
|
||||||
|
const examplePath = path.join(projectRoot, 'src', 'config', 'config.json.example')
|
||||||
|
|
||||||
// Check if config.json exists
|
// Check if config.json exists
|
||||||
if (fs.existsSync(configPath)) {
|
if (fs.existsSync(configPath)) {
|
||||||
|
|
@ -19,7 +20,7 @@ if (fs.existsSync(configPath)) {
|
||||||
|
|
||||||
// Check if example exists
|
// Check if example exists
|
||||||
if (!fs.existsSync(examplePath)) {
|
if (!fs.existsSync(examplePath)) {
|
||||||
console.error('✗ config.json.example not found')
|
console.error('✗ config.json.example not found at', examplePath)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -33,3 +34,4 @@ try {
|
||||||
console.error('✗ Failed to create config.json:', err.message)
|
console.error('✗ Failed to create config.json:', err.message)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue