Skip to content

Commit

Permalink
Fix windows bugs with new glob
Browse files Browse the repository at this point in the history
Remove ignore code to see if it fixes it

Revert "Update to the latest glob"

This reverts commit f201757.

# Conflicts:
#	lib/utils/apply-action-sync.js
#	lib/utils/apply-action.js

Revert "Revert "Update to the latest glob""

This reverts commit c3ac7e1.

Add posix flag to glob
  • Loading branch information
bcomnes committed Oct 25, 2023
1 parent 35128d8 commit eb7ab6a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions bin/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ module.exports = function main (source, outDir, args) {
}
return Promise.resolve()
}).catch(error => {
console.error(error)
console.error(`Failed to copy: ${error.message}.`)
process.exit(1)
})
Expand Down
5 changes: 3 additions & 2 deletions lib/utils/apply-action-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@ module.exports = function applyActionSync (pattern, options, action) {
const globOptions = {
nodir: !options.includeEmptyDirs,
follow: Boolean(options.dereference),
posix: true,
ignore: {
ignored: p => {
try {
return p.relative() ? ig.ignores(p.relative()) : false
return p.relativePosix() ? ig.ignores(p.relativePosix()) : false
} catch (err) {
console.error(err)
}
},
childrenIgnored: (p) => {
try {
return p.relative() ? ig.ignores(p.relative()) : false
return p.relativePosix() ? ig.ignores(p.relativePosix()) : false
} catch (err) {
console.error(err)
}
Expand Down
5 changes: 3 additions & 2 deletions lib/utils/apply-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ module.exports = async function applyAction (pattern, options, action) {
const globOptions = {
nodir: !options.includeEmptyDirs,
follow: Boolean(options.dereference),
posix: true,
ignore: {
ignored: (p) => {
try {
return p.relative() ? ig.ignores(p.relative()) : false
return p.relativePosix() ? ig.ignores(p.relativePosix()) : false
} catch (err) {
console.error(err)
}
},
childrenIgnored: (p) => {
try {
return p.relative() ? ig.ignores(p.relative()) : false
return p.relativePosix() ? ig.ignores(p.relativePosix()) : false
} catch (err) {
console.error(err)
}
Expand Down

0 comments on commit eb7ab6a

Please sign in to comment.