0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00

build: fix path concatenation

- The `Path` class does not support concatenation with the `+`
operator, so use the `/` operator instead.
- When concatenating paths, if the operand is an absolute path the
previous path is ignored, so change `/include` to `include`.

PR-URL: https://github.com/nodejs/node/pull/55387
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Mohammed Keyvanzadeh 2024-10-17 16:35:02 +03:30 committed by GitHub
parent 5e5af2947f
commit 70fcb87af4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1356,7 +1356,7 @@ def configure_zos(o):
o['variables']['node_static_zoslib'] = b(True)
if options.static_zoslib_gyp:
# Apply to all Node.js components for now
o['variables']['zoslib_include_dir'] = Path(options.static_zoslib_gyp).parent + '/include'
o['variables']['zoslib_include_dir'] = Path(options.static_zoslib_gyp).parent / 'include'
o['include_dirs'] += [o['variables']['zoslib_include_dir']]
else:
raise Exception('--static-zoslib-gyp=<path to zoslib.gyp file> is required.')