Skip to content

Commit 6f9b1fd

Browse files
committed
debug
1 parent a2e5bcc commit 6f9b1fd

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

lib/configure.js

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -254,37 +254,24 @@ function configure (gyp, argv, callback) {
254254
// - the out/Debug directory
255255
// - the root directory
256256
var node_exp_file = undefined
257-
if (process.platform === 'aix') {
257+
if (process.platform === 'aix' || process.platform === 'os390') {
258+
var ext = process.platform === 'aix' ? 'exp' : 'x'
258259
var node_root_dir = findNodeDirectory()
259-
var candidates = ['include/node/node.exp',
260-
'out/Release/node.exp',
261-
'out/Debug/node.exp',
262-
'node.exp']
260+
var candidates = ['include/node/node',
261+
'out/Release/node',
262+
'out/Debug/node',
263+
'node'].map((file) => {
264+
return `${file}.${ext}`
265+
})
263266
var logprefix = 'find exports file'
264267
node_exp_file = findAccessibleSync(logprefix, node_root_dir, candidates)
265268
if (node_exp_file !== undefined) {
266269
log.verbose(logprefix, 'Found exports file: %s', node_exp_file)
267270
} else {
268-
var msg = msgFormat('Could not find node.exp file in %s', node_root_dir)
271+
var msg = msgFormat(`Could not find node.${ext} file in %s`, node_root_dir)
269272
log.error(logprefix, 'Could not find exports file')
270273
return callback(new Error(msg))
271274
}
272-
} else if (process.platform === 'os390') {
273-
var node_root_dir = findNodeDirectory()
274-
var candidates = ['include/node/node.x',
275-
'out/Release/node.x',
276-
'out/Debug/node.x',
277-
'node.x']
278-
for (var next = 0; next < candidates.length; next++) {
279-
node_exp_file = path.resolve(node_root_dir, candidates[next])
280-
try {
281-
fs.accessSync(node_exp_file, fs.R_OK)
282-
// exp file found, stop looking
283-
break
284-
} catch (_) {
285-
// this candidate was not found or not readable, do nothing
286-
}
287-
}
288275
}
289276

290277
// this logic ported from the old `gyp_addon` python file

0 commit comments

Comments
 (0)