Skip to content

Commit 65a06f4

Browse files
authored
fix: Toolkit always opens Output panel on startup #3939
Problem: Output panel always opens at VS Code launch. #3930 Solution: Instead of showing Output panel at Redshift activation, change to show Output panel only when a message is added.
1 parent 2f06145 commit 65a06f4

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Output panel always opens at VS Code launch."
4+
}

src/redshift/activation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { showViewLogsMessage } from '../shared/utilities/messages'
2121

2222
export async function activate(ctx: ExtContext): Promise<void> {
2323
const outputChannel = globals.outputChannel
24-
outputChannel.show(true)
2524

2625
if ('NotebookEdit' in vscode) {
2726
ctx.extensionContext.subscriptions.push(
@@ -86,6 +85,7 @@ function getNotebookConnectClickedHandler(
8685
return
8786
}
8887
redshiftNotebookController.redshiftClient = new DefaultRedshiftClient(connectionParams.region!.id)
88+
outputChannel.show(true)
8989
try {
9090
const redshiftClient = (redshiftNotebookController.redshiftClient = new DefaultRedshiftClient(
9191
connectionParams.region!.id
@@ -134,6 +134,7 @@ function getEditConnectionHandler(outputChannel: vscode.OutputChannel) {
134134
await vscode.commands.executeCommand('aws.refreshAwsExplorerNode', redshiftWarehouseNode)
135135
}
136136
} catch (error) {
137+
outputChannel.show(true)
137138
outputChannel.appendLine(
138139
`Redshift: Failed to fetch databases for warehouse ${redshiftWarehouseNode.name} - ${
139140
(error as Error).message

src/redshift/explorer/redshiftWarehouseNode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ export class RedshiftWarehouseNode extends AWSTreeNodeBase implements AWSResourc
145145
await updateConnectionParamsState(this.arn, this.connectionParams)
146146
return childNodes
147147
} catch (error) {
148+
globals.outputChannel.show(true)
148149
const msg = `Redshift: Failed to fetch databases for warehouse ${this.redshiftWarehouse.name} - ${
149150
(error as Error).message
150151
}`

0 commit comments

Comments
 (0)