File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -132,17 +132,17 @@ async function main(argv = process.argv) {
132
132
const prebuildsFinds = await find ( prebuildsPath , / .n o d e $ / ) ;
133
133
if ( buildFinds . length > 0 || prebuildsFinds . length > 0 ) {
134
134
let nativeAddonPath = nodeGypBuild . path ( nodePackage ) ;
135
- // Use relative paths
135
+ // Must use relative paths
136
+ // so that assets are added relative to the project
136
137
nativeAddonPath = path . relative ( projectRoot , nativeAddonPath ) ;
137
138
pkgConfig . assets . push ( nativeAddonPath ) ;
138
139
}
139
140
}
140
141
console . error ( 'Configured pkg with:' ) ;
141
142
console . error ( pkgConfig ) ;
142
- const pkgConfigPath = path . join (
143
- os . tmpdir ( ) ,
144
- `pkg-bundle-config-${ randomString ( 6 ) } .json`
145
- ) ;
143
+ // The pkg config must be in the same directory as the `package.json`
144
+ // otherwise the relative paths won't work
145
+ const pkgConfigPath = path . join ( projectRoot , 'pkg.json' ) ;
146
146
await fs . promises . writeFile ( pkgConfigPath , JSON . stringify ( pkgConfig ) ) ;
147
147
const pkgPlatform = platforms [ platform ] ;
148
148
const pkgArch = archs [ arch ] ;
You can’t perform that action at this time.
0 commit comments