Skip to content

Commit

Permalink
fix: replace rimraf with rm (#5162)
Browse files Browse the repository at this point in the history
  • Loading branch information
askoufis committed Apr 24, 2024
1 parent be8a832 commit 1a1561f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 11 deletions.
4 changes: 1 addition & 3 deletions lib/Server.js
Expand Up @@ -1116,13 +1116,11 @@ class Server {

// cert is more than 30 days old, kill it with fire
if ((now - Number(certificateStat.ctime)) / certificateTtl > 30) {
const { rimraf } = require("rimraf");

this.logger.info(
"SSL certificate is more than 30 days old. Removing...",
);

await rimraf(certificatePath);
await fs.promises.rm(certificatePath, { recursive: true });

certificateExists = false;
}
Expand Down
50 changes: 43 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -68,7 +68,6 @@
"launch-editor": "^2.6.1",
"open": "^10.0.3",
"p-retry": "^6.2.0",
"rimraf": "^5.0.5",
"schema-utils": "^4.2.0",
"selfsigned": "^2.4.1",
"serve-index": "^1.9.1",
Expand Down Expand Up @@ -121,6 +120,7 @@
"puppeteer": "^22.1.0",
"readable-stream": "^4.5.2",
"require-from-string": "^2.0.2",
"rimraf": "^5.0.5",
"sockjs-client": "^1.6.1",
"standard-version": "^9.3.0",
"strip-ansi-v6": "npm:strip-ansi@^6.0.0",
Expand Down

0 comments on commit 1a1561f

Please sign in to comment.