mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
get auto and prefer from install expr (#7624)
This commit is contained in:
@@ -302,7 +302,7 @@ pub const Bunfig = struct {
|
||||
break :brk install_;
|
||||
};
|
||||
|
||||
if (json.get("auto")) |auto_install_expr| {
|
||||
if (_bun.get("auto")) |auto_install_expr| {
|
||||
if (auto_install_expr.data == .e_string) {
|
||||
this.ctx.debug.global_cache = options.GlobalCache.Map.get(auto_install_expr.asString(this.allocator) orelse "") orelse {
|
||||
try this.addError(auto_install_expr.loc, "Invalid auto install setting, must be one of true, false, or \"force\" \"fallback\" \"disable\"");
|
||||
@@ -325,7 +325,7 @@ pub const Bunfig = struct {
|
||||
}
|
||||
}
|
||||
|
||||
if (json.get("prefer")) |prefer_expr| {
|
||||
if (_bun.get("prefer")) |prefer_expr| {
|
||||
try this.expect(prefer_expr, .e_string);
|
||||
|
||||
if (Prefer.get(prefer_expr.asString(bun.default_allocator) orelse "")) |setting| {
|
||||
|
||||
Reference in New Issue
Block a user