Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,15 @@ class ClinicDoctor extends events.EventEmitter {
stdio.push('pipe')
}

let NODE_PATH = path.join(__dirname, 'injects')
// use NODE_PATH to work around issues with spaces in inject path
if (process.env.NODE_PATH) {
NODE_PATH += `${process.platform === 'win32' ? ';' : ':'}${process.env.NODE_PATH}`
}

const customEnv = {
// use NODE_PATH to work around issues with spaces in inject path
NODE_PATH: path.join(__dirname, 'injects'),
NODE_PATH,
NODE_OPTIONS: logArgs.join(' ') + (
process.env.NODE_OPTIONS ? ' ' + process.env.NODE_OPTIONS : ''
),
Expand Down