mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 20:39:05 +00:00
fix test-child-process-fork-exec-argv.js (#19639)
Co-authored-by: 190n <ben@bun.sh> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ comptime {
|
||||
@export(&createArgv0, .{ .name = "Bun__Process__createArgv0" });
|
||||
@export(&getExecPath, .{ .name = "Bun__Process__getExecPath" });
|
||||
@export(&createExecArgv, .{ .name = "Bun__Process__createExecArgv" });
|
||||
@export(&getEval, .{ .name = "Bun__Process__getEval" });
|
||||
}
|
||||
|
||||
var title_mutex = bun.Mutex{};
|
||||
@@ -193,6 +194,14 @@ pub fn getExecArgv(global: *JSGlobalObject) callconv(.c) JSValue {
|
||||
return Bun__Process__getExecArgv(global);
|
||||
}
|
||||
|
||||
pub fn getEval(globalObject: *JSC.JSGlobalObject) callconv(.C) JSC.JSValue {
|
||||
const vm = globalObject.bunVM();
|
||||
if (vm.module_loader.eval_source) |source| {
|
||||
return JSC.ZigString.init(source.contents).toJS(globalObject);
|
||||
}
|
||||
return .js_undefined;
|
||||
}
|
||||
|
||||
pub const getCwd = JSC.host_fn.wrap1(getCwd_);
|
||||
fn getCwd_(globalObject: *JSC.JSGlobalObject) bun.JSError!JSC.JSValue {
|
||||
var buf: bun.PathBuffer = undefined;
|
||||
|
||||
Reference in New Issue
Block a user