Skip to content

Commit

Permalink
Merge pull request #191 from davidmarkclements/fix-ticks-win
Browse files Browse the repository at this point in the history
Escape __dirname before generating regexp
  • Loading branch information
mcollina authored Oct 19, 2018
2 parents 04d119a + 9727c01 commit c5db278
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ticks-to-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ const { spawnSync } = require('child_process')
const { join } = require('path')
const debug = require('debug')('0x: ticks-to-tree')
const assert = require('assert')
const escape = require('escape-string-regexp')

const preloadDirRx = RegExp(join(__dirname, 'preload'))
const preloadDirRx = RegExp(join(escape(__dirname), 'preload'))
const internalModuleRegExp = /^.?(?:\(anonymous\)|internalBinding|NativeModule[^ ]*) [^/\\][a-zA-Z0-9_/\\-]+\.js:\d+:\d+$/
const nodeBootstrapRegExp = / internal\/bootstrap.+\.js:\d+:\d+$/

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"debug": "^4.0.1",
"end-of-stream": "^1.1.0",
"env-string": "^1.0.0",
"escape-string-regexp": "^1.0.5",
"execspawn": "^1.0.1",
"has-unicode": "^2.0.1",
"hsl-to-rgb-for-reals": "^1.1.0",
Expand Down

0 comments on commit c5db278

Please sign in to comment.