Skip to content

Commit 636c929

Browse files
committed
expose bsb_helper path
1 parent 210961b commit 636c929

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

lib_dev/process.js

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as child_process from "node:child_process";
2+
import * as fs from "node:fs/promises";
23
import * as path from "node:path";
34
import { bsc_exe, rescript_exe } from "#cli/bins";
45

@@ -168,8 +169,9 @@ export function setup(cwd = process.cwd()) {
168169
* @param {ExecOptions} [options]
169170
* @return {Promise<ExecResult>}
170171
*/
171-
bsc(args = [], options = {}) {
172-
return exec(bsc_exe, args, options);
172+
async bsc(args = [], options = {}) {
173+
const realPath = await fs.realpath(bsc_exe);
174+
return exec(realPath, args, options);
173175
},
174176

175177
/**
@@ -179,8 +181,9 @@ export function setup(cwd = process.cwd()) {
179181
* @param {ExecOptions} [options]
180182
* @return {Promise<ExecResult>}
181183
*/
182-
execBuild(args = [], options = {}) {
183-
return exec(rescript_exe, ["build", ...args], options);
184+
async execBuild(args = [], options = {}) {
185+
const realPath = await fs.realpath(rescript_exe);
186+
return exec(realPath, ["build", ...args], options);
184187
},
185188

186189
/**
@@ -190,8 +193,9 @@ export function setup(cwd = process.cwd()) {
190193
* @param {ExecOptions} [options]
191194
* @return {Promise<ExecResult>}
192195
*/
193-
execClean(args = [], options = {}) {
194-
return exec(rescript_exe, ["clean", ...args], options);
196+
async execClean(args = [], options = {}) {
197+
const realPath = await fs.realpath(rescript_exe);
198+
return exec(realPath, ["clean", ...args], options);
195199
},
196200

197201
/**
@@ -203,8 +207,9 @@ export function setup(cwd = process.cwd()) {
203207
* @param {ExecOptions} [options]
204208
* @return {Promise<ExecResult>}
205209
*/
206-
execBin(bin, args = [], options = {}) {
207-
return exec(bin, args, options);
210+
async execBin(bin, args = [], options = {}) {
211+
const realPath = await fs.realpath(bin);
212+
return exec(realPath, args, options);
208213
},
209214
};
210215
}

packages/@rescript/darwin-arm64/bin.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as path from "node:path";
55
export const binDir = path.join(import.meta.dirname, "bin");
66

77
export const binPaths = {
8+
bsb_helper_exe: path.join(binDir, "bsb_helper.exe"),
89
bsc_exe: path.join(binDir, "bsc.exe"),
910
ninja_exe: path.join(binDir, "ninja.exe"),
1011
rescript_exe: path.join(binDir, "rescript.exe"),

packages/@rescript/darwin-x64/bin.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as path from "node:path";
55
export const binDir = path.join(import.meta.dirname, "bin");
66

77
export const binPaths = {
8+
bsb_helper_exe: path.join(binDir, "bsb_helper.exe"),
89
bsc_exe: path.join(binDir, "bsc.exe"),
910
ninja_exe: path.join(binDir, "ninja.exe"),
1011
rescript_exe: path.join(binDir, "rescript.exe"),

packages/@rescript/linux-arm64/bin.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as path from "node:path";
55
export const binDir = path.join(import.meta.dirname, "bin");
66

77
export const binPaths = {
8+
bsb_helper_exe: path.join(binDir, "bsb_helper.exe"),
89
bsc_exe: path.join(binDir, "bsc.exe"),
910
ninja_exe: path.join(binDir, "ninja.exe"),
1011
rescript_exe: path.join(binDir, "rescript.exe"),

packages/@rescript/linux-x64/bin.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as path from "node:path";
55
export const binDir = path.join(import.meta.dirname, "bin");
66

77
export const binPaths = {
8+
bsb_helper_exe: path.join(binDir, "bsb_helper.exe"),
89
bsc_exe: path.join(binDir, "bsc.exe"),
910
ninja_exe: path.join(binDir, "ninja.exe"),
1011
rescript_exe: path.join(binDir, "rescript.exe"),

packages/@rescript/win32-x64/bin.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as path from "node:path";
55
export const binDir = path.join(import.meta.dirname, "bin");
66

77
export const binPaths = {
8+
bsb_helper_exe: path.join(binDir, "bsb_helper.exe"),
89
bsc_exe: path.join(binDir, "bsc.exe"),
910
ninja_exe: path.join(binDir, "ninja.exe"),
1011
rescript_exe: path.join(binDir, "rescript.exe"),

0 commit comments

Comments
 (0)