fix code to properly handle relative paths (#9777)

This commit is contained in:
Anthony Dresser
2020-03-28 14:59:19 -07:00
committed by GitHub
parent a8fd578d42
commit 586ec50916

View File

@@ -71,9 +71,10 @@ export class SqlToolsServer {
}
private async download(context: AppContext): Promise<string> {
const rawConfig = await fs.readFile(path.join(context.extensionContext.extensionPath, 'config.json'));
const configDir = context.extensionContext.extensionPath;
const rawConfig = await fs.readFile(path.join(configDir, 'config.json'));
this.config = JSON.parse(rawConfig.toString());
this.config.installDirectory = path.join(__dirname, this.config.installDirectory);
this.config.installDirectory = path.join(configDir, this.config.installDirectory);
this.config.proxy = vscode.workspace.getConfiguration('http').get('proxy');
this.config.strictSSL = vscode.workspace.getConfiguration('http').get('proxyStrictSSL') || true;