Error out for unsupported dotnet versions for sql db projects (#16428)

* Merge conflict resolution

* Throw error for unsupported versions of Dotnet

* Fix for darwin

* Fix for all platforms

* Address comments

* Fix extensionsGaller.json

* Address comments

* Update default installation path for linux

* Fix test

* Revert default installation location change for Linux

* Address comments

* Removed extra try-catch block
This commit is contained in:
Sakshi Sharma
2021-08-06 18:41:34 -07:00
committed by GitHub
parent 512c2d3ddc
commit 9ee941eb12
3 changed files with 115 additions and 23 deletions

View File

@@ -9,7 +9,7 @@ import * as fs from 'fs';
import * as path from 'path';
import * as vscode from 'vscode';
import * as sinon from 'sinon';
import { NetCoreTool, DBProjectConfigurationKey, NetCoreInstallLocationKey, NextCoreNonWindowsDefaultPath } from '../tools/netcoreTool';
import { NetCoreTool, DBProjectConfigurationKey, NetCoreInstallLocationKey, NetCoreNonWindowsDefaultPath } from '../tools/netcoreTool';
import { getQuotedPath } from '../common/utils';
import { isNullOrUndefined } from 'util';
import { generateTestFolderPath } from './testUtils';
@@ -47,7 +47,7 @@ describe('NetCoreTool: Net core tests', function (): void {
if (os.platform() === 'linux' || os.platform() === 'darwin') {
//check that path should start with /usr/local/share
let result = isNullOrUndefined(netcoreTool.netcoreInstallLocation) || netcoreTool.netcoreInstallLocation.toLowerCase().startsWith(NextCoreNonWindowsDefaultPath);
let result = isNullOrUndefined(netcoreTool.netcoreInstallLocation) || netcoreTool.netcoreInstallLocation.toLowerCase().startsWith(NetCoreNonWindowsDefaultPath);
should(result).true('dotnet is either not present or in /usr/local/share by default');
}
});