@@ -30666,11 +30666,11 @@ const copy = async (src, dest, isDirectory, file) => {
3066630666 core.debug(`Render all files in directory ${ src } to ${ dest }`)
3066730667
3066830668 const srcFileList = await readfiles(src, { readContents: false, hidden: true })
30669- for (const file of srcFileList) {
30670- if (!filterFunc(file )) { continue }
30669+ for (const srcFile of srcFileList) {
30670+ if (!filterFunc(srcFile )) { continue }
3067130671
30672- const srcPath = path.join(src, file )
30673- const destPath = path.join(dest, file )
30672+ const srcPath = path.join(src, srcFile )
30673+ const destPath = path.join(dest, srcFile )
3067430674 await write(srcPath, destPath, file.template)
3067530675 }
3067630676 } else {
@@ -30690,15 +30690,15 @@ const copy = async (src, dest, isDirectory, file) => {
3069030690 const srcFileList = await readfiles(src, { readContents: false, hidden: true })
3069130691 const destFileList = await readfiles(dest, { readContents: false, hidden: true })
3069230692
30693- for (const file of destFileList) {
30694- if (srcFileList.indexOf(file ) === -1) {
30695- const filePath = path.join(dest, file )
30693+ for (const destFile of destFileList) {
30694+ if (srcFileList.indexOf(destFile ) === -1) {
30695+ const filePath = path.join(dest, destFile )
3069630696 core.debug(`Found a orphaned file in the target repo - ${ filePath }`)
3069730697
30698- if (exclude !== undefined && exclude.includes(path.join(src, file ))) {
30699- core.debug(`Excluding file ${ file }`)
30698+ if (file. exclude !== undefined && file. exclude.includes(path.join(src, destFile ))) {
30699+ core.debug(`Excluding file ${ destFile }`)
3070030700 } else {
30701- core.debug(`Removing file ${ file }`)
30701+ core.debug(`Removing file ${ destFile }`)
3070230702 await fs.remove(filePath)
3070330703 }
3070430704 }
0 commit comments