File tree Expand file tree Collapse file tree
packages/provider-grok/src/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ it.layer(layerTest)("GrokDriver", (it) => {
117117 executable : binaryPath ,
118118 args : [ "update" ] ,
119119 lockKey : "grok" ,
120+ // npm 12 otherwise skips the postinstall that installs the new binary.
121+ env : expect . objectContaining ( { npm_config_allow_scripts : "@xai-official/grok" } ) ,
120122 } ) ,
121123 } ,
122124 ] as const ;
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ const DRIVER_KIND = ProviderDriverKind.make("grok");
5050// npm latest matches the stable channel installed by grok update.
5151const GROK_NPM_PACKAGE = "@xai-official/grok" ;
5252// `grok update` installs under `GROK_HOME`; use the resolved executable and instance environment.
53+ // npm 12 blocks the postinstall that moves the new binary in, yet exits 0, so allow it by env.
5354// Homebrew casks need brew upgrades; `grok update` would install a second copy.
5455// Keep casks manual when their brew cannot vouch for them.
5556const UPDATE : ProviderMaintenanceCapabilitiesResolver = {
@@ -83,7 +84,7 @@ const UPDATE: ProviderMaintenanceCapabilitiesResolver = {
8384 updateArgs : [ "update" ] ,
8485 updateLockKey : "grok" ,
8586 platform : context . platform ,
86- env : context . env ,
87+ env : { ... context . env , npm_config_allow_scripts : GROK_NPM_PACKAGE } ,
8788 } ) ;
8889 } ) ,
8990} ;
You can’t perform that action at this time.
0 commit comments