From d541fef5091ac3fc800ee2d711bb772824bf4007 Mon Sep 17 00:00:00 2001 From: bokuweb Date: Sun, 22 Oct 2023 14:00:54 +0900 Subject: [PATCH] fix --- src/push.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/push.ts b/src/push.ts index 5b8bc1e7..b003b0ee 100644 --- a/src/push.ts +++ b/src/push.ts @@ -564,7 +564,11 @@ export const pushImages = async (input: PushImagesInput) => { } if (input.result.newItems.length > 0) { - const newGlobs = `${(workspace(), constants.ACTUAL_DIR_NAME)}/(${input.result.newItems.join('|')})`; + const newGlobs = + input.result.newItems.length === 1 + ? `${(workspace(), constants.ACTUAL_DIR_NAME)}/${input.result.newItems[0]})` + : `${(workspace(), constants.ACTUAL_DIR_NAME)}/(${input.result.newItems.join('|')})`; + console.log(newGlobs); try { cpx.copySync(newGlobs, `${REPO_TEMP}/${destinationFolder}/new/`);