From 3ed733e4f852e52785c3ba32eee28969efd07779 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Fri, 5 Feb 2021 09:55:06 -0300 Subject: [PATCH] fix(admin.gbapp): Fix in DONT_DOWNLOAD. --- packages/admin.gbapp/dialogs/AdminDialog.ts | 4 +++- packages/admin.gbapp/services/GBAdminService.ts | 2 +- packages/kb.gbapp/services/KBService.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/admin.gbapp/dialogs/AdminDialog.ts b/packages/admin.gbapp/dialogs/AdminDialog.ts index 697106b38..048b0693c 100644 --- a/packages/admin.gbapp/dialogs/AdminDialog.ts +++ b/packages/admin.gbapp/dialogs/AdminDialog.ts @@ -283,7 +283,9 @@ export class AdminDialog extends IGBDialog { } else { cmd1 = `deployPackage ${packageName}`; } - if ((await (deployer as any).getStoragePackageByName(min.instance.instanceId, packageName)) !== null) { + if ((await (deployer as any).getStoragePackageByName(min.instance.instanceId, packageName)) !== null && + !process.env.DONT_DOWNLOAD + ) { const cmd2 = `undeployPackage ${packageName}`; await GBAdminService.undeployPackageCommand(cmd2, min); } diff --git a/packages/admin.gbapp/services/GBAdminService.ts b/packages/admin.gbapp/services/GBAdminService.ts index 1bc25180e..cea0a105a 100644 --- a/packages/admin.gbapp/services/GBAdminService.ts +++ b/packages/admin.gbapp/services/GBAdminService.ts @@ -193,7 +193,7 @@ export class GBAdminService implements IGBAdminService { // of local resources is required. - if (!localFolder.endsWith('.gbot')&& !process.env.DONT_DOWNLOAD) { + if (!localFolder.endsWith('.gbot') && !process.env.DONT_DOWNLOAD) { GBLog.warn(`${GBConfigService.get('CLOUD_USERNAME')} must be authorized on SharePoint related site to download to: ${localFolder}`); await s.downloadFolder( localFolder, diff --git a/packages/kb.gbapp/services/KBService.ts b/packages/kb.gbapp/services/KBService.ts index 2e094d8c2..e75e55aa9 100644 --- a/packages/kb.gbapp/services/KBService.ts +++ b/packages/kb.gbapp/services/KBService.ts @@ -367,7 +367,7 @@ export class KBService implements IGBKBService { instanceId: number, packageId: number ): Promise { - GBLog.info(`Now reading file ${filePath}...`); + GBLog.info(`Now reading file ${filePath}...`); const workbook = new Excel.Workbook(); const data = await workbook.xlsx.readFile(filePath);