File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 55import { execFileSync } from "node:child_process" ;
66
77import { bsc_exe } from "./common/bins.js" ;
8+ import { runtimePath } from "./common/runtime.js" ;
89
910const delegate_args = process . argv . slice ( 2 ) ;
11+ if ( ! delegate_args . includes ( "-runtime-path" ) ) {
12+ delegate_args . push ( "-runtime-path" , runtimePath ) ;
13+ }
1014
1115try {
1216 execFileSync ( bsc_exe , delegate_args , { stdio : "inherit" } ) ;
Original file line number Diff line number Diff line change 1+ // @ts -check
2+ import { createRequire } from "node:module" ;
3+ import * as path from "node:path" ;
4+
5+ const require = createRequire ( import . meta. url ) ;
6+
7+ const runtimePackageJson = require . resolve ( "@rescript/runtime/package.json" ) ;
8+
9+ export const runtimePath = path . dirname ( runtimePackageJson ) ;
Original file line number Diff line number Diff line change 99 " cli/bsc.js" ,
1010 " cli/bstracing.js" ,
1111 " cli/common/bins.js" ,
12+ " cli/common/runtime.js" ,
1213 " cli/rescript-legacy.js" ,
1314 " cli/rescript-legacy/args.js" ,
1415 " cli/rescript-legacy/bsb.js" ,
You can’t perform that action at this time.
0 commit comments