Skip to content

Commit

Permalink
refactor: cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Oct 16, 2023
1 parent 6a0c19d commit 98dc6da
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,9 @@ export function editDeps() {
const filter = new RegExp(
`^.*(${Object.keys(depEdits)
.map((mod) => {
mod = mod.replace('.', '\\.');
if (process.platform === 'win32') {
return mod.replace('/', '\\\\');
} else {
return mod.replace('/', '\\/');
}
return mod
.replace('.', '\\.')
.replace('/', process.platform === 'win32' ? '\\\\' : '\\/');
})
.join('|')})$`
);
Expand Down

0 comments on commit 98dc6da

Please sign in to comment.