Skip to content

Commit

Permalink
Use forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowCait committed Aug 14, 2022
1 parent 979ab21 commit 3b18843
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/upload-media.ts
Expand Up @@ -4,11 +4,11 @@ import * as core from '@actions/core'

export async function uploadMedia(mediaPaths: string[]): Promise<string[]> {
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
Expand Down

0 comments on commit 3b18843

Please sign in to comment.