|
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,18 @@ 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 | + ...environmentService.extraExtensionPaths, |
| 223 | + ...environmentService.extraBuiltinExtensionPaths, |
| 224 | + ].map((p) => fs.mkdir(p, { recursive: true }).catch((error) => { |
| 225 | + logger.warn(error.message || error); |
| 226 | + }))); |
| 227 | + |
218 | 228 | const logService = new MultiplexLogService([
|
219 | 229 | new ConsoleLogger(getLogLevel(environmentService)),
|
220 | 230 | new SpdLogLogger(RemoteExtensionLogFileName, path.join(environmentService.logsPath, `${RemoteExtensionLogFileName}.log`), false, getLogLevel(environmentService))
|
|
0 commit comments