Skip to content

Commit c2ac976

Browse files
authored
Merge pull request #5367 from dotty-staging/fix/tracing-zip
Don't zip workspace if tracing is disabled
2 parents 6421ba6 + 8bdb5d2 commit c2ac976

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

vscode-dotty/src/tracer.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,17 @@ export class Tracer {
7575

7676
run(): vscode.OutputChannel | undefined {
7777
const consentCommandDisposable = vscode.commands.registerCommand(consentCommandName, () => this.askForTracingConsent())
78-
if (this.isTracingEnabled && this.tracingConsent.get() === 'no-answer') this.askForTracingConsent()
79-
this.initializeAsyncWorkspaceDump()
80-
81-
const lspOutputChannel = this.createLspOutputChannel()
82-
const statusBarItem = this.createStatusBarItem()
83-
for (const disposable of [consentCommandDisposable, lspOutputChannel, statusBarItem]) {
84-
if (disposable) this.ctx.extensionContext.subscriptions.push(disposable)
78+
if (this.isTracingEnabled) {
79+
if (this.tracingConsent.get() === 'no-answer') this.askForTracingConsent()
80+
this.initializeAsyncWorkspaceDump()
81+
82+
const lspOutputChannel = this.createLspOutputChannel()
83+
const statusBarItem = this.createStatusBarItem()
84+
for (const disposable of [consentCommandDisposable, lspOutputChannel, statusBarItem]) {
85+
if (disposable) this.ctx.extensionContext.subscriptions.push(disposable)
86+
}
87+
return lspOutputChannel
8588
}
86-
return lspOutputChannel
8789
}
8890

8991
private askForTracingConsent(): void {

0 commit comments

Comments
 (0)