From 06c32e1dad4e25e2c2f6c51dd4431f3a16ca6cfc Mon Sep 17 00:00:00 2001 From: v-rucdu Date: Fri, 4 Jun 2021 00:38:09 +0530 Subject: [PATCH] Updated logo validator --- .script/logoValidator.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.script/logoValidator.ts b/.script/logoValidator.ts index 6a4ee8d322..1c3496a0f2 100644 --- a/.script/logoValidator.ts +++ b/.script/logoValidator.ts @@ -4,6 +4,7 @@ import { ExitCode } from "./utils/exitCode"; import * as logger from "./utils/logger"; import { isValidLogoImage } from "./utils/LogoChecker/logoImageChecker"; import { isValidLogoImageSVGContent } from "./utils/LogoChecker/logoImageSVGChecker"; +import { LogoValidationError } from "./utils/validationError"; export async function IsValidLogo(FileName: string): Promise { if(FileName.indexOf("Logos") != -1 || FileName.indexOf("Data Connectors/Logo") != -1) @@ -15,6 +16,10 @@ export async function IsValidLogo(FileName: string): Promise { isValidLogoImageSVGContent(svgContent) } } + else + { + throw new LogoValidationError(`Logo must be in Logos or Logo folder ` + FileName); + } return ExitCode.SUCCESS; }