From 3b188434c18bfc99dfbaf6498fa9936059b6533a Mon Sep 17 00:00:00 2001 From: SnowCait Date: Sun, 14 Aug 2022 18:21:28 +0900 Subject: [PATCH] Use forEach --- src/upload-media.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/upload-media.ts b/src/upload-media.ts index 1ae4e5d..86b2dc2 100644 --- a/src/upload-media.ts +++ b/src/upload-media.ts @@ -4,11 +4,11 @@ import * as core from '@actions/core' export async function uploadMedia(mediaPaths: string[]): Promise { core.debug(JSON.stringify(mediaPaths)) - for (const path of mediaPaths) { + mediaPaths.forEach(path => { if (!fs.existsSync(path)) { throw new Error(`${path} not exists`) } - } + }) const appKey = process.env.CONSUMER_API_KEY as string const appSecret = process.env.CONSUMER_API_SECRET_KEY as string