Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,16 @@ export async function copy(src, dest, isDirectory, file) {
const srcFileList = await readfiles(src, { readContents: false, hidden: true })
const destFileList = await readfiles(dest, { readContents: false, hidden: true })

let skipGitDir = false

for (const destFile of destFileList) {
if (destFile.startsWith('.git')) return
if (destFile.startsWith(`.git${ path.sep }`)) {
if (!skipGitDir) {
core.debug('Skipping files under .git directory')
skipGitDir = true
}
continue
}
if (srcFileList.indexOf(destFile) === -1) {
const filePath = path.join(dest, destFile)
core.debug(`Found an orphaned file in the target repo - ${ filePath }`)
Expand Down