|
1 | | -import * as fs from 'fs'; |
| 1 | +import { promises as fs } from 'fs'; |
2 | 2 | import * as net from 'net'; |
3 | 3 | import { hostname, release } from 'os'; |
4 | 4 | import * as path from 'path'; |
@@ -213,8 +213,16 @@ export class Vscode { |
213 | 213 | private async initializeServices(args: NativeParsedArgs): Promise<void> { |
214 | 214 | const productService = { _serviceBrand: undefined, ...product }; |
215 | 215 | const environmentService = new NativeEnvironmentService(args, productService); |
216 | | - // https://github.com/cdr/code-server/issues/1693 |
217 | | - fs.mkdirSync(environmentService.globalStorageHome.fsPath, { recursive: true }); |
| 216 | + |
| 217 | + await Promise.all([ |
| 218 | + environmentService.extensionsPath, |
| 219 | + environmentService.logsPath, |
| 220 | + environmentService.globalStorageHome.fsPath, |
| 221 | + environmentService.workspaceStorageHome.fsPath, |
| 222 | + ].map((p) => fs.mkdir(p, { recursive: true }).catch((error) => { |
| 223 | + logger.warn(error.message || error); |
| 224 | + }))); |
| 225 | + |
218 | 226 | const logService = new MultiplexLogService([ |
219 | 227 | new ConsoleLogger(getLogLevel(environmentService)), |
220 | 228 | new SpdLogLogger(RemoteExtensionLogFileName, path.join(environmentService.logsPath, `${RemoteExtensionLogFileName}.log`), false, getLogLevel(environmentService)) |
|
0 commit comments