@@ -30666,11 +30666,11 @@ const copy = async (src, dest, isDirectory, file) => {
30666
30666
core.debug(`Render all files in directory ${ src } to ${ dest }`)
30667
30667
30668
30668
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 }
30671
30671
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 )
30674
30674
await write(srcPath, destPath, file.template)
30675
30675
}
30676
30676
} else {
@@ -30690,15 +30690,15 @@ const copy = async (src, dest, isDirectory, file) => {
30690
30690
const srcFileList = await readfiles(src, { readContents: false, hidden: true })
30691
30691
const destFileList = await readfiles(dest, { readContents: false, hidden: true })
30692
30692
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 )
30696
30696
core.debug(`Found a orphaned file in the target repo - ${ filePath }`)
30697
30697
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 }`)
30700
30700
} else {
30701
- core.debug(`Removing file ${ file }`)
30701
+ core.debug(`Removing file ${ destFile }`)
30702
30702
await fs.remove(filePath)
30703
30703
}
30704
30704
}
0 commit comments