Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/patches/post-install.diff

27 lines
815 B
Diff
Raw Normal View History

Replace rimraf with fs.rmSync in postinstall
The postinstall gets ran when you install with npm but rimraf is a development
dependency so it will not exist.
Index: code-server/lib/vscode/extensions/postinstall.js
===================================================================
--- code-server.orig/lib/vscode/extensions/postinstall.js
+++ code-server/lib/vscode/extensions/postinstall.js
@@ -8,7 +8,6 @@
const fs = require('fs');
const path = require('path');
-const rimraf = require('rimraf');
const root = path.join(__dirname, 'node_modules', 'typescript');
@@ -21,7 +20,7 @@ function processRoot() {
if (!toKeep.has(name)) {
const filePath = path.join(root, name);
console.log(`Removed ${filePath}`);
- rimraf.sync(filePath);
+ fs.rmSync(filePath, { recursive: true });
}
}
}