|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information. |
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
| 6 | +import * as os from 'os'; |
| 7 | +import * as fs from 'fs'; |
6 | 8 | import { spawn, ChildProcess, SpawnOptions } from 'child_process'; |
7 | 9 | import { buildHelpMessage, buildVersionMessage, addArg, createWaitMarkerFile, OPTIONS } from 'vs/platform/environment/node/argv'; |
8 | 10 | import { parseCLIProcessArgv } from 'vs/platform/environment/node/argvHelper'; |
9 | 11 | import { ParsedArgs } from 'vs/platform/environment/common/environment'; |
10 | 12 | import product from 'vs/platform/product/common/product'; |
11 | 13 | import * as paths from 'vs/base/common/path'; |
12 | | -import * as os from 'os'; |
13 | | -import * as fs from 'fs'; |
14 | 14 | import { whenDeleted, writeFileSync } from 'vs/base/node/pfs'; |
15 | 15 | import { findFreePort, randomPort } from 'vs/base/node/ports'; |
16 | 16 | import { resolveTerminalEncoding } from 'vs/base/node/encoding'; |
17 | | -import * as iconv from 'iconv-lite'; |
18 | 17 | import { isWindows, isLinux } from 'vs/base/common/platform'; |
19 | 18 | import { ProfilingSession, Target } from 'v8-inspect-profiler'; |
20 | 19 | import { isString } from 'vs/base/common/types'; |
@@ -179,7 +178,8 @@ export async function main(argv: string[]): Promise<any> { |
179 | 178 | if (!stdinFileError) { |
180 | 179 |
|
181 | 180 | // Pipe into tmp file using terminals encoding |
182 | | - resolveTerminalEncoding(verbose).then(encoding => { |
| 181 | + resolveTerminalEncoding(verbose).then(async encoding => { |
| 182 | + const iconv = await import('iconv-lite'); |
183 | 183 | const converterStream = iconv.decodeStream(encoding); |
184 | 184 | process.stdin.pipe(converterStream).pipe(stdinFileStream); |
185 | 185 | }); |
|
0 commit comments