mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 11:29:02 +00:00
[bun.js] Support mode and flags as integer args in fs.openSync (instead of only object)
This commit is contained in:
@@ -985,6 +985,12 @@ const Arguments = struct {
|
||||
if (val.getIfPropertyExists(ctx.ptr(), "mode")) |mode_| {
|
||||
mode = JSC.Node.modeFromJS(ctx, mode_, exception) orelse mode;
|
||||
}
|
||||
} else if (!val.isEmpty()) {
|
||||
flags = FileSystemFlags.fromJS(ctx, val, exception) orelse flags;
|
||||
|
||||
if (arguments.nextEat()) |next| {
|
||||
mode = JSC.Node.modeFromJS(ctx, next, exception) orelse mode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user