[env loader] Don't panic when .env fails to load for unexpected reasons

This commit is contained in:
Jarred Sumner
2022-08-21 01:45:14 -07:00
parent 6ab53fca36
commit d8f40e080d

View File

@@ -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;
},