From c7691e320096b99e3e879553d31e8036b5d11036 Mon Sep 17 00:00:00 2001 From: Rohit Gohri Date: Sun, 3 May 2020 23:00:51 +0530 Subject: [PATCH] chore: run validate script only when run directly --- scripts/data-validate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/data-validate.js b/scripts/data-validate.js index 01f4ff15..de719696 100644 --- a/scripts/data-validate.js +++ b/scripts/data-validate.js @@ -40,4 +40,6 @@ async function main() { await communicateValidationOutcome(errors, failedUrls, data); } -main(); +if (require.main === module) { + main(); +}