Archived
1
0

Replace fs-extra with fs.promises

Remove the Mac directory copy instead of refactoring it since we've had
this for a long time now and I think it's safe to assume that users
running code-server on Mac don't have the old directory anymore.
This commit is contained in:
Asher
2021-03-15 16:15:24 -05:00
parent 3ef7cc7d03
commit 964ebe8d0a
9 changed files with 37 additions and 78 deletions

View File

@ -1,4 +1,4 @@
import * as fs from "fs-extra"
import { promises as fs } from "fs"
import * as net from "net"
import * as path from "path"
import * as tls from "tls"
@ -75,7 +75,7 @@ export class SocketProxyProvider {
this._proxyServer = this.findFreeSocketPath(this.proxyPipe)
.then((pipe) => {
this.proxyPipe = pipe
return Promise.all([fs.mkdirp(tmpdir), fs.remove(this.proxyPipe)])
return Promise.all([fs.mkdir(tmpdir, { recursive: true }), fs.rmdir(this.proxyPipe, { recursive: true })])
})
.then(() => {
return new Promise((resolve) => {