mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
修复模块注入
This commit is contained in:
1 parent
a1f888af59
commit
07951964a1
11 files changed
+50
-92
No files matched your search
@@ -36,10 +36,12 @@ async function linkCommand() {
|
||||
const source = path.join(config.rootPath, 'shell', link.src);
|
||||
const target = path.join(commandDir, link.dest);
|
||||
const tmpTarget = path.join(commandDir, link.tmp);
|
||||
const stats = await fs.lstat(tmpTarget);
|
||||
if (stats) {
|
||||
await fs.unlink(tmpTarget);
|
||||
}
|
||||
try {
|
||||
const stats = await fs.lstat(tmpTarget);
|
||||
if (stats) {
|
||||
await fs.unlink(tmpTarget);
|
||||
}
|
||||
} catch (error) { }
|
||||
await fs.symlink(source, tmpTarget);
|
||||
await fs.rename(tmpTarget, target);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user