Replace 'remove' from 'fs-extra' with rm

This commit is contained in:
Markus Olsson 2022-03-04 15:53:23 +01:00
parent acf6195a38
commit 97b25d2a9e
2 changed files with 5 additions and 7 deletions

View file

@ -1,5 +1,4 @@
import * as FSE from 'fs-extra'
import { appendFile } from 'fs/promises'
import { appendFile, rm } from 'fs/promises'
import { getCommits, revRange } from '.'
import { Commit } from '../../models/commit'
import { MultiCommitOperationKind } from '../../models/multi-commit-operation'
@ -145,7 +144,7 @@ export async function reorder(
return RebaseResult.Error
} finally {
if (todoPath !== undefined) {
FSE.remove(todoPath)
await rm(todoPath, { recursive: true, force: true })
}
}

View file

@ -1,5 +1,4 @@
import * as FSE from 'fs-extra'
import { appendFile, writeFile } from 'fs/promises'
import { appendFile, rm, writeFile } from 'fs/promises'
import { getCommits, revRange } from '.'
import { Commit } from '../../models/commit'
import { MultiCommitOperationKind } from '../../models/multi-commit-operation'
@ -160,11 +159,11 @@ export async function squash(
return RebaseResult.Error
} finally {
if (todoPath !== undefined) {
FSE.remove(todoPath)
await rm(todoPath, { recursive: true, force: true })
}
if (messagePath !== undefined) {
FSE.remove(messagePath)
await rm(messagePath, { recursive: true, force: true })
}
}