Skip to content

Commit

Permalink
use different lib to clean the runtime folder
Browse files Browse the repository at this point in the history
Fixes #40
  • Loading branch information
Manual committed Nov 21, 2022
1 parent 27803a9 commit 2857f27
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion extension/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var vscode = require('vscode');
var fs = require('mz/fs');
var fsExtra = require('fs-extra');
var rmdir = require("rimraf")
var path = require('path');
var lockPath = path.join(__dirname, '../firstload.lock');

Expand Down Expand Up @@ -131,7 +132,7 @@ function activate(context) {
async function installRuntime() {
// if runtimeDir exists, delete it and then update
if (fs.existsSync(runtimeDir)) {
fs.rmSync(runtimeDir, { recursive: true });
rmdir.sync(runtimeDir);
}

await fs.mkdir(runtimeDir);
Expand Down
13 changes: 12 additions & 1 deletion package-lock.json

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

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@
},
"dependencies": {
"fs-extra": "^10.1.0",
"mz": "^2.7.0"
"mz": "^2.7.0",
"rifraf": "^2.0.3"
},
"devDependencies": {
"node-gyp": "^9.1.0",
"node-addon-api": "^5.0.0"
"node-addon-api": "^5.0.0",
"node-gyp": "^9.1.0"
}
}

0 comments on commit 2857f27

Please sign in to comment.