Skip to content

Commit

Permalink
Merge 0005dd9 into d62f081
Browse files Browse the repository at this point in the history
  • Loading branch information
mbland committed Dec 28, 2023
2 parents d62f081 + 0005dd9 commit daa0a96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ describe('jsdoc-cli-wrapper', () => {

try {
const jsdocPath = await getPath('jsdoc', process.env, process.platform)
const jsdocDir = path.dirname(jsdocPath).replaceAll('\\', '\\\\')
const pat = new RegExp(`${path.delimiter}?${jsdocDir}${path.delimiter}?`)
testEnvPath = testEnvPath.replace(pat, '')
const jsdocDir = path.dirname(jsdocPath)
testEnvPath = testEnvPath.split(path.delimiter)
.filter(p => p !== jsdocDir)
.join(path.delimiter)
} catch { /* It's OK if it's not actually installed. */ }

return spawnMain(testEnvPath, ...argv)
Expand Down

0 comments on commit daa0a96

Please sign in to comment.