mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-19 12:34:22 +08:00
feat:修复了亿点点bug
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
const root = process.cwd()
|
||||
const targets = ['db.sqlite']
|
||||
|
||||
for (const name of targets) {
|
||||
const filePath = path.join(root, name)
|
||||
try {
|
||||
if (fs.existsSync(filePath)) {
|
||||
fs.rmSync(filePath, { force: true })
|
||||
console.log(`[clean-db] removed ${filePath}`)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(`[clean-db] failed to remove ${filePath}:`, e?.message || e)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user