@@ -186,42 +186,47 @@ it.layer(NodeServices.layer)("build-npm-platform-packages", (it) => {
186186 const hostPlatform = yield * HostProcessPlatform ;
187187 const hostArch = yield * HostProcessArchitecture ;
188188 const env = { ...process . env , NODE_PATH : fixture . outputDir } as Record < string , string > ;
189- const passthrough = yield * run ( process . execPath , [ "bin/t3.js" , "serve" , "--port" , "1234" ] , {
190- cwd : launcherDir ,
191- env,
192- } ) ;
193- assert . equal ( passthrough . stdout . trim ( ) , `stub ${ hostPlatform } -${ hostArch } serve --port 1234` ) ;
194- assert . equal ( passthrough . exitCode , 7 ) ;
189+ if ( KEYS . some ( ( key ) => key === `${ hostPlatform } -${ hostArch } ` ) ) {
190+ const passthrough = yield * run ( process . execPath , [ "bin/t3.js" , "serve" , "--port" , "1234" ] , {
191+ cwd : launcherDir ,
192+ env,
193+ } ) ;
194+ assert . equal (
195+ passthrough . stdout . trim ( ) ,
196+ `stub ${ hostPlatform } -${ hostArch } serve --port 1234` ,
197+ ) ;
198+ assert . equal ( passthrough . exitCode , 7 ) ;
195199
196- // Run the entry point used by already-installed service updaters from
197- // the published tarball, including their preflight arguments.
198- const installedLauncher = path . join ( fixture . root , "installed-launcher" ) ;
199- yield * fs . makeDirectory ( installedLauncher ) ;
200- const unpack = yield * run (
201- "tar" ,
202- [ "-xf" , path . join ( fixture . outputDir , "t3.tgz" ) , "-C" , installedLauncher ] ,
203- {
204- cwd : fixture . root ,
205- } ,
206- ) ;
207- assert . equal ( unpack . exitCode , 0 , unpack . stderr ) ;
208- const legacy = yield * run (
209- process . execPath ,
210- [
211- "dist/bin.mjs" ,
212- "__service-preflight" ,
213- "--database-path" ,
214- "a database.sqlite" ,
215- "--launcher-protocol" ,
216- "2" ,
217- ] ,
218- { cwd : path . join ( installedLauncher , "package" ) , env } ,
219- ) ;
220- assert . equal (
221- legacy . stdout . trim ( ) ,
222- `stub ${ hostPlatform } -${ hostArch } __service-preflight --database-path a database.sqlite --launcher-protocol 2` ,
223- ) ;
224- assert . equal ( legacy . exitCode , 7 ) ;
200+ // Run the entry point used by already-installed service updaters from
201+ // the published tarball, including their preflight arguments.
202+ const installedLauncher = path . join ( fixture . root , "installed-launcher" ) ;
203+ yield * fs . makeDirectory ( installedLauncher ) ;
204+ const unpack = yield * run (
205+ "tar" ,
206+ [ "-xf" , path . join ( fixture . outputDir , "t3.tgz" ) , "-C" , installedLauncher ] ,
207+ {
208+ cwd : fixture . root ,
209+ } ,
210+ ) ;
211+ assert . equal ( unpack . exitCode , 0 , unpack . stderr ) ;
212+ const legacy = yield * run (
213+ process . execPath ,
214+ [
215+ "dist/bin.mjs" ,
216+ "__service-preflight" ,
217+ "--database-path" ,
218+ "a database.sqlite" ,
219+ "--launcher-protocol" ,
220+ "2" ,
221+ ] ,
222+ { cwd : path . join ( installedLauncher , "package" ) , env } ,
223+ ) ;
224+ assert . equal (
225+ legacy . stdout . trim ( ) ,
226+ `stub ${ hostPlatform } -${ hostArch } __service-preflight --database-path a database.sqlite --launcher-protocol 2` ,
227+ ) ;
228+ assert . equal ( legacy . exitCode , 7 ) ;
229+ }
225230
226231 const unsupported = yield * run ( process . execPath , [ "bin/t3.js" , "--version" ] , {
227232 cwd : launcherDir ,
0 commit comments