mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-16 04:28:39 +00:00
fix(cli): keep rollback backup path narrowed
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
This commit is contained in:
parent
343ab0b6f3
commit
5e6dd21f5b
1 changed files with 3 additions and 2 deletions
|
|
@ -212,13 +212,14 @@ export async function installSkill(options: InstallOptions): Promise<{ installed
|
|||
}
|
||||
}
|
||||
if (item.backupDir) {
|
||||
const backupDir = item.backupDir
|
||||
try {
|
||||
await rename(item.backupDir, item.skillDir)
|
||||
await rename(backupDir, item.skillDir)
|
||||
item.backupDir = null
|
||||
} catch (rollbackError) {
|
||||
rollbackFailures.push({
|
||||
operation: 'restore backup',
|
||||
path: item.backupDir,
|
||||
path: backupDir,
|
||||
error: describeError(rollbackError)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue