diff --git a/dist/index.js b/dist/index.js index 6d9cc5a1..888cc04f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -30697,9 +30697,10 @@ const copy = async (src, dest, isDirectory, file) => { const destFileList = await readfiles(dest, { readContents: false, hidden: true }) for (const destFile of destFileList) { + if (destFile.startsWith('.git')) return if (srcFileList.indexOf(destFile) === -1) { const filePath = path.join(dest, destFile) - core.debug(`Found a orphaned file in the target repo - ${ filePath }`) + core.debug(`Found an orphaned file in the target repo - ${ filePath }`) if (file.exclude !== undefined && file.exclude.includes(path.join(src, destFile))) { core.debug(`Excluding file ${ destFile }`) diff --git a/src/helpers.js b/src/helpers.js index 19ee4cb5..ccd722d0 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -117,9 +117,10 @@ const copy = async (src, dest, isDirectory, file) => { const destFileList = await readfiles(dest, { readContents: false, hidden: true }) for (const destFile of destFileList) { + if (destFile.startsWith('.git')) return if (srcFileList.indexOf(destFile) === -1) { const filePath = path.join(dest, destFile) - core.debug(`Found a orphaned file in the target repo - ${ filePath }`) + core.debug(`Found an orphaned file in the target repo - ${ filePath }`) if (file.exclude !== undefined && file.exclude.includes(path.join(src, destFile))) { core.debug(`Excluding file ${ destFile }`)