Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure.js: escape '<' #1506

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 8 additions & 1 deletion lib/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,16 @@ function configure (gyp, argv, callback) {
// Windows expects an absolute path
output_dir = buildDir
}

var target_arch_gyp_variable = '<(target_arch)'
if (process.platform === 'win32' && python.toLowerCase().endsWith('.bat')) {
// Windows will interpret python as a batch file, so we need to escape the '<' character
target_arch_gyp_variable = '^^^<(target_arch)'
}

var nodeGypDir = path.resolve(__dirname, '..')
var nodeLibFile = path.join(nodeDir,
!gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)',
!gyp.opts.nodedir ? target_arch_gyp_variable : '$(Configuration)',
release.name + '.lib')

argv.push('-I', addon_gypi)
Expand Down