diff --git a/plugins/nx-container/src/executors/build/executor.ts b/plugins/nx-container/src/executors/build/executor.ts index 72727d1c..c85e77f4 100644 --- a/plugins/nx-container/src/executors/build/executor.ts +++ b/plugins/nx-container/src/executors/build/executor.ts @@ -20,7 +20,7 @@ const runExecutor: PromiseExecutor = async (options, ctx) = ...options, file: options.file || join(getProjectRoot(ctx), 'Dockerfile'), }, - ctx + ctx, ); const prefix = names(ctx?.projectName || '').constantName; @@ -40,13 +40,17 @@ const runExecutor: PromiseExecutor = async (options, ctx) = const buildCmd = engine.getCommand(args); await logger.group('Build', async () => { + logger.verbose(`Build command: ${buildCmd.command} ${buildCmd.args.join(' ')}`); + await getExecOutput( buildCmd.command, buildCmd.args.map((arg) => interpolate(arg)), { ignoreReturnCode: true, - } + }, ).then((res) => { + logger.verbose(res.stdout); + if (res.stderr.length > 0 && res.exitCode != 0) { throw new Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`); }