Skip to content

Commit

Permalink
fix: silence deprecation warning for fs.rmdir (#697)
Browse files Browse the repository at this point in the history
`fs.rmdir` with the `recursive` option is deprecated in favour of `fs.rm`
with the `recursive` operation, so use that instead.
  • Loading branch information
achingbrain committed Nov 19, 2021
1 parent 6b616e0 commit 45ef5ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ipfsd-daemon.js
Expand Up @@ -172,7 +172,7 @@ class Daemon {
*/
async cleanup () {
if (!this.clean) {
await fs.rmdir(this.path, {
await fs.rm(this.path, {
recursive: true
})
this.clean = true
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Expand Up @@ -14,7 +14,7 @@ const log = debug('ipfsd-ctl:utils')
*/
const removeRepo = async (repoPath) => {
try {
await fs.promises.rmdir(repoPath, {
await fs.promises.rm(repoPath, {
recursive: true
})
} catch (err) {
Expand Down

0 comments on commit 45ef5ca

Please sign in to comment.