diff --git a/packages/docker/src/index.ts b/packages/docker/src/index.ts index 3419c4f..278d951 100644 --- a/packages/docker/src/index.ts +++ b/packages/docker/src/index.ts @@ -16,15 +16,14 @@ import { import { checkEnvironment } from './utils' async function run(): Promise { - const input = await getInputFromStdin() - - const args = input['args'] - const command = input['command'] - const responseFile = input['responseFile'] - const state = input['state'] - try { checkEnvironment() + const input = await getInputFromStdin() + + const args = input['args'] + const command = input['command'] + const responseFile = input['responseFile'] + const state = input['state'] switch (command) { case Command.PrepareJob: await prepareJob(args as PrepareJobArgs, responseFile) diff --git a/packages/k8s/src/index.ts b/packages/k8s/src/index.ts index d58167b..452d1e7 100644 --- a/packages/k8s/src/index.ts +++ b/packages/k8s/src/index.ts @@ -9,15 +9,14 @@ import { import { isAuthPermissionsOK, namespace, requiredPermissions } from './k8s' async function run(): Promise { - const input = await getInputFromStdin() - - const args = input['args'] - const command = input['command'] - const responseFile = input['responseFile'] - const state = input['state'] - let exitCode = 0 try { + const input = await getInputFromStdin() + + const args = input['args'] + const command = input['command'] + const responseFile = input['responseFile'] + const state = input['state'] if (!(await isAuthPermissionsOK())) { throw new Error( `The Service account needs the following permissions ${JSON.stringify(