File tree 2 files changed +13
-2
lines changed
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
6
6
7
7
### v0.30.5 - TBD
8
8
9
+ * Install: pass ` PKG_CONFIG_PATH ` via env rather than substitution.
10
+ [ @dwisiswant0 ] ( https://github.com/dwisiswant0 )
11
+
9
12
* Allow installation of prebuilt libvips binaries from filesystem.
10
13
[ #3196 ] ( https://github.com/lovell/sharp/pull/3196 )
11
14
[ @ankurparihar ] ( https://github.com/ankurparihar )
Original file line number Diff line number Diff line change @@ -65,7 +65,12 @@ const isRosetta = function () {
65
65
66
66
const globalLibvipsVersion = function ( ) {
67
67
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 ;
69
74
/* istanbul ignore next */
70
75
return ( globalLibvipsVersion || '' ) . trim ( ) ;
71
76
} else {
@@ -85,7 +90,10 @@ const removeVendoredLibvips = function () {
85
90
86
91
const pkgConfigPath = function ( ) {
87
92
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 || '' ;
89
97
return [
90
98
brewPkgConfigPath . trim ( ) ,
91
99
env . PKG_CONFIG_PATH ,
You can’t perform that action at this time.
0 commit comments