mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Have Install-SsmsMin task clean up all older versions (#5670)
This commit is contained in:
@@ -679,15 +679,16 @@ gulp.task('install-sqltoolsservice', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function installSsmsMin() {
|
function installSsmsMin() {
|
||||||
let config = require('../extensions/admin-tool-ext-win/src/config.json');
|
const config = require('../extensions/admin-tool-ext-win/src/config.json');
|
||||||
return platformInfo.getCurrent().then(p => {
|
return platformInfo.getCurrent().then(p => {
|
||||||
let runtime = p.runtimeId;
|
const runtime = p.runtimeId;
|
||||||
// fix path since it won't be correct
|
// fix path since it won't be correct
|
||||||
config.installDirectory = path.join(__dirname, '..', 'extensions', 'admin-tool-ext-win', config.installDirectory);
|
config.installDirectory = path.join(__dirname, '..', 'extensions', 'admin-tool-ext-win', config.installDirectory);
|
||||||
var installer = new serviceDownloader(config);
|
var installer = new serviceDownloader(config);
|
||||||
let serviceInstallFolder = installer.getInstallDirectory(runtime);
|
const serviceInstallFolder = installer.getInstallDirectory(runtime);
|
||||||
console.log('Cleaning up the install folder: ' + serviceInstallFolder);
|
const serviceCleanupFolder = path.join(serviceInstallFolder, '..');
|
||||||
return del(serviceInstallFolder + '/*').then(() => {
|
console.log('Cleaning up the install folder: ' + serviceCleanupFolder);
|
||||||
|
return del(serviceCleanupFolder + '/*').then(() => {
|
||||||
console.log('Installing the service. Install folder: ' + serviceInstallFolder);
|
console.log('Installing the service. Install folder: ' + serviceInstallFolder);
|
||||||
return installer.installService(runtime);
|
return installer.installService(runtime);
|
||||||
}, delError => {
|
}, delError => {
|
||||||
|
|||||||
Reference in New Issue
Block a user