mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 10:58:31 -05:00
Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 (#7206)
* Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 * fix config changes * fix strictnull checks
This commit is contained in:
@@ -10,8 +10,10 @@ import * as vscode from 'vscode';
|
||||
import { TelemetryReporter, TelemetryViews } from './telemetry';
|
||||
import { doubleEscapeSingleQuotes, backEscapeDoubleQuotes, getTelemetryErrorType } from './utils';
|
||||
import { ChildProcess, exec } from 'child_process';
|
||||
import { promisify } from 'util';
|
||||
import { readFile } from 'fs';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
const ssmsMinVer = JSON.parse(JSON.stringify(require('./config.json'))).version;
|
||||
|
||||
let exePath: string;
|
||||
const runningProcesses: Map<number, ChildProcess> = new Map<number, ChildProcess>();
|
||||
@@ -66,6 +68,8 @@ export interface LaunchSsmsDialogParams {
|
||||
export async function activate(context: vscode.ExtensionContext): Promise<void> {
|
||||
// This is for Windows-specific support so do nothing on other platforms
|
||||
if (process.platform === 'win32') {
|
||||
const rawConfig = await promisify(readFile)(path.join(context.extensionPath, 'config.json'));
|
||||
const ssmsMinVer = JSON.parse(rawConfig.toString()).version;
|
||||
exePath = path.join(context.extensionPath, 'ssmsmin', 'Windows', ssmsMinVer, 'ssmsmin.exe');
|
||||
registerCommands(context);
|
||||
}
|
||||
@@ -259,4 +263,4 @@ export async function buildUrn(node: azdata.objectexplorer.ObjectExplorerNode):
|
||||
}
|
||||
|
||||
return ['Server'].concat(urnNodes).join('/');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user