Skip to content

Commit 0997cac

Browse files
fix(open): don't claim mssql extension install succeeded when we only fire-and-forget it
tool.Run calls Process.Release immediately after Start, so the previous 'MSSQL extension installed successfully' message printed before the install had a chance to fail. Tell the user the install was requested and to watch VS Code for progress; only warn when the launch itself fails.
1 parent bf46393 commit 0997cac

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

cmd/modern/root/open/vscode.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ func (c *VSCode) launchVSCode(build string, endpoint sqlconfig.Endpoint, user *s
147147
}
148148

149149
if c.installExtension {
150-
output.Info(localizer.Sprintf("Installing MSSQL extension..."))
151-
_, err := t.Run([]string{"--install-extension", "ms-mssql.mssql", "--force"})
152-
if err != nil {
153-
output.Warn(localizer.Sprintf("Could not install MSSQL extension: %s", err.Error()))
154-
} else {
155-
output.Info(localizer.Sprintf("MSSQL extension installed successfully"))
150+
// Run is fire-and-forget (Process.Release), so we cannot report the
151+
// install's real outcome here. Tell the user it was requested and
152+
// point them at VS Code's own progress in case it fails.
153+
output.Info(localizer.Sprintf("Requested MSSQL extension install; watch VS Code for progress"))
154+
if _, err := t.Run([]string{"--install-extension", "ms-mssql.mssql", "--force"}); err != nil {
155+
output.Warn(localizer.Sprintf("Could not start MSSQL extension install: %s", err.Error()))
156156
}
157157
} else {
158158
// Check if MSSQL extension is installed, warn if not.

0 commit comments

Comments
 (0)