Skip to content

Commit 8a40461

Browse files
pieharcanis
authored andcommitted
fix(pack): higher priority to .npmignore over .gitignore on windows (#5979)
1 parent 59377f6 commit 8a40461

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/filter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export function filterOverridenGitignores(files: WalkFiles): WalkFiles {
160160
} else {
161161
//don't include .gitignore if .npmignore or .yarnignore are present
162162
const dir = path.dirname(file.absolute);
163-
const higherPriorityIgnoreFilePaths = [`${dir}/${IGNORE_FILENAMES[0]}`, `${dir}/${IGNORE_FILENAMES[1]}`];
163+
const higherPriorityIgnoreFilePaths = [path.join(dir, IGNORE_FILENAMES[0]), path.join(dir, IGNORE_FILENAMES[1])];
164164
const hasHigherPriorityFiles = files.find(file => higherPriorityIgnoreFilePaths.indexOf(file.absolute) > -1);
165165
if (!hasHigherPriorityFiles) {
166166
return [...acc, file];

0 commit comments

Comments
 (0)