mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
[env loader] Don't panic when .env fails to load for unexpected reasons
This commit is contained in:
@@ -890,6 +890,15 @@ pub const Loader = struct {
|
||||
@field(this, base) = logger.Source.initPathString(base, "");
|
||||
return;
|
||||
},
|
||||
error.FileBusy, error.DeviceBusy, error.AccessDenied, error.IsDir => {
|
||||
if (!this.quiet) {
|
||||
Output.prettyErrorln("<r><red>{s}<r> error loading {s} file", .{ @errorName(err), base });
|
||||
}
|
||||
|
||||
// prevent retrying
|
||||
@field(this, base) = logger.Source.initPathString(base, "");
|
||||
return;
|
||||
},
|
||||
else => {
|
||||
return err;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user