From 2d1ce9a2235dd2e2ca03ae9c630be0cca1d67179 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Mon, 27 Mar 2023 17:52:54 +0200 Subject: [PATCH] bake: check for empty source Signed-off-by: CrazyMax --- src/buildx/bake.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/buildx/bake.ts b/src/buildx/bake.ts index 2e92f694..b276411f 100644 --- a/src/buildx/bake.ts +++ b/src/buildx/bake.ts @@ -38,7 +38,10 @@ export class Bake { let remoteDef; const files: Array = []; if (sources) { - for (const source of sources) { + for (const source of sources.map(v => v.trim())) { + if (source.length == 0) { + continue; + } if (!Util.isValidRef(source)) { files.push(source); continue;