File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ Requires libvips v8.12.2
66
77### v0.30.5 - TBD
88
9+ * Install: pass ` PKG_CONFIG_PATH ` via env rather than substitution.
10+ [ @dwisiswant0 ] ( https://github.com/dwisiswant0 )
11+
912* Allow installation of prebuilt libvips binaries from filesystem.
1013 [ #3196 ] ( https://github.com/lovell/sharp/pull/3196 )
1114 [ @ankurparihar ] ( https://github.com/ankurparihar )
Original file line number Diff line number Diff line change @@ -65,7 +65,12 @@ const isRosetta = function () {
6565
6666const globalLibvipsVersion = function ( ) {
6767 if ( process . platform !== 'win32' ) {
68- const globalLibvipsVersion = spawnSync ( `PKG_CONFIG_PATH="${ pkgConfigPath ( ) } " pkg-config --modversion vips-cpp` , spawnSyncOptions ) . stdout ;
68+ const globalLibvipsVersion = spawnSync ( 'pkg-config --modversion vips-cpp' , {
69+ ...spawnSyncOptions ,
70+ env : {
71+ PKG_CONFIG_PATH : pkgConfigPath ( )
72+ }
73+ } ) . stdout ;
6974 /* istanbul ignore next */
7075 return ( globalLibvipsVersion || '' ) . trim ( ) ;
7176 } else {
@@ -85,7 +90,10 @@ const removeVendoredLibvips = function () {
8590
8691const pkgConfigPath = function ( ) {
8792 if ( process . platform !== 'win32' ) {
88- const brewPkgConfigPath = spawnSync ( 'which brew >/dev/null 2>&1 && eval $(brew --env) && echo $PKG_CONFIG_LIBDIR' , spawnSyncOptions ) . stdout || '' ;
93+ const brewPkgConfigPath = spawnSync (
94+ 'which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2' ,
95+ spawnSyncOptions
96+ ) . stdout || '' ;
8997 return [
9098 brewPkgConfigPath . trim ( ) ,
9199 env . PKG_CONFIG_PATH ,
You can’t perform that action at this time.
0 commit comments