Skip to content

Commit c1975f9

Browse files
committed
avoid circular dep
1 parent e9b4605 commit c1975f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/shared/utilities/processUtils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import * as logger from '../logger'
99
import { Timeout, CancellationError, waitUntil } from './timeoutUtils'
1010
import { PollingSet } from './pollingSet'
1111
import { getLogger } from '../logger/logger'
12-
import { isWin } from '../vscode/env'
1312

1413
export interface RunParameterContext {
1514
/** Reports an error parsed from the stdin/stdout streams. */
@@ -184,7 +183,8 @@ export class ChildProcessTracker {
184183
}
185184
}
186185
try {
187-
return isWin() ? getWindowsUsage() : getUnixUsage()
186+
// isWin() leads to circular dependency.
187+
return process.platform === 'win32' ? getWindowsUsage() : getUnixUsage()
188188
} catch (e) {
189189
ChildProcessTracker.logger.warn(`ChildProcess: Failed to get process stats for ${pid}: ${e}`)
190190
return { cpu: 0, memory: 0 }

0 commit comments

Comments
 (0)