From b4d2b55e3060841ad0d6a867f2a1981a60738a14 Mon Sep 17 00:00:00 2001 From: p-zielinski <82354717+p-zielinski@users.noreply.github.com> Date: Thu, 19 Oct 2023 09:07:56 +0200 Subject: [PATCH] Update manage-project.ts --- scripts/manage-project.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/manage-project.ts b/scripts/manage-project.ts index 447afeb6d..4002e5099 100644 --- a/scripts/manage-project.ts +++ b/scripts/manage-project.ts @@ -106,19 +106,18 @@ const runCliProcess = async ({ stdoutIncludes, stderrIncludes, resolveErrorAsFalse = false, - ignoreStdout = false, }: { command: string; stdoutIncludes?: string; stderrIncludes?: string; resolveErrorAsFalse?: boolean; - ignoreStdout?: boolean; }) => { return await new Promise((resolve) => { exec(command, (error, stdout, stderr) => { + const stdoutClean = stdout.replace(/.*voucherify/, "").trim(); if ( - (stdoutIncludes && stdout?.includes(stdoutIncludes)) || - (!ignoreStdout && !stdoutIncludes && stdout) || + (stdoutIncludes && stdoutClean?.includes(stdoutIncludes)) || + (!stdoutIncludes && stdoutClean) || (stderrIncludes && stderr.includes(stderrIncludes)) ) { return resolve(true); @@ -166,7 +165,6 @@ const uploadOpenApiFile = async (version) => { await runCliProcess({ command: `rdme openapi ./reference/OpenAPI.json --version=${version} --create`, stderrIncludes: `We're sorry, your upload request timed out. Please try again or split your file up into smaller chunks.`, - ignoreStdout: true, }); console.log(colors.green("OPEN API FILE WAS UPLOADED")); };