@@ -22,7 +22,7 @@ it.live("loads the CLI with its cache settings only when the command needs it",
2222 ` ;
2323 const run = Effect . fn ( "cliCompileCache.test.run" ) ( function * (
2424 env : Record < string , string > ,
25- command = "--help" ,
25+ args : ReadonlyArray < string > = [ "--help" ] ,
2626 ) {
2727 const child = yield * spawner . spawn (
2828 ChildProcess . make (
@@ -32,7 +32,7 @@ it.live("loads the CLI with its cache settings only when the command needs it",
3232 "--import" ,
3333 `data:text/javascript,${ encodeURIComponent ( report ) } ` ,
3434 NodeURL . fileURLToPath ( new URL ( "./bin.ts" , import . meta. url ) ) ,
35- command ,
35+ ... args ,
3636 ] ,
3737 {
3838 env : {
@@ -61,10 +61,13 @@ it.live("loads the CLI with its cache settings only when the command needs it",
6161 expect ( normal . stderr . replaceAll ( "\\" , "/" ) ) . toContain (
6262 `CACHE=${ root } /cache/t3code/compile-cache` . replaceAll ( "\\" , "/" ) ,
6363 ) ;
64- const launcher = yield * run ( { T3CODE_HOME : "" } , "__service-launcher" ) ;
64+ const launcher = yield * run ( { T3CODE_HOME : "" } , [ "__service-launcher" ] ) ;
6565 expect ( launcher . exitCode ) . toBe ( 1 ) ;
6666 expect ( launcher . stderr ) . toContain ( "[service-launcher] T3CODE_HOME is required" ) ;
6767 expect ( launcher . stderr ) . not . toMatch ( / L O A D E D _ C L I _ M A I N | C A C H E = / ) ;
68+ const launcherHelp = yield * run ( { T3CODE_HOME : "" } , [ "__service-launcher" , "--help" ] ) ;
69+ expect ( launcherHelp . exitCode ) . toBe ( 0 ) ;
70+ expect ( launcherHelp . stderr ) . toContain ( "LOADED_CLI_MAIN" ) ;
6871 const appImage = yield * run ( { APPIMAGE : `${ root } /T3Code.AppImage` } ) ;
6972 expect ( appImage . exitCode ) . toBe ( 0 ) ;
7073 expect ( appImage . stderr ) . toContain ( "CACHE=disabled" ) ;
0 commit comments