From 802b329cf104ca6bf5f4d1db88639584bb6fe66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Peter=20Kr=C3=A4mer?= Date: Tue, 10 Oct 2017 21:18:41 +0200 Subject: [PATCH] fix(): set context right immediately --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index d90a1efc..3fb0e733 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,7 +20,7 @@ export * from './generators'; export { getDeepLinkData } from './deep-linking/util'; import { generateContext } from './util/config'; -import { getAppScriptsVersion } from './util/helpers'; +import { getAppScriptsVersion, setContext } from './util/helpers'; import { Logger } from './logger/logger'; export function run(task: string) { @@ -30,6 +30,7 @@ export function run(task: string) { try { const context = generateContext(null); + setContext(context); require(`../dist/${task}`)[task](context).catch((err: any) => { errorLog(task, err); });