Compare commits

...

3 Commits

Author SHA1 Message Date
Jarred Sumner
76e2bfaf11 Merge branch 'main' into jarred/add-e-isdir 2024-04-08 07:40:00 -07:00
Jarred Sumner
00c31ca439 Merge branch 'main' into jarred/add-e-isdir 2024-04-08 07:32:58 -07:00
Jarred Sumner
703ad5a8d8 add EISDIR where error.isDir is used 2024-04-07 22:59:02 -07:00
3 changed files with 3 additions and 2 deletions

View File

@@ -550,7 +550,7 @@ pub const StandaloneModuleGraph = struct {
bun.toFD(root_dir.fd),
bun.sliceTo(&(try std.os.toPosixPath(std.fs.path.basename(outfile))), 0),
) catch |err| {
if (err == error.IsDir) {
if (err == error.IsDir or err == error.EISDIR) {
Output.prettyErrorln("<r><red>error<r><d>:<r> {} is a directory. Please choose a different --outfile or delete the directory", .{bun.fmt.quote(outfile)});
} else {
Output.prettyErrorln("<r><red>error<r><d>:<r> failed to rename {s} to {s}: {s}", .{ temp_location, outfile, @errorName(err) });

View File

@@ -600,7 +600,7 @@ pub const PackageJSON = struct {
false,
null,
) catch |err| {
if (err != error.IsDir) {
if (err != error.IsDir and err != error.EISDIR) {
r.log.addErrorFmt(null, logger.Loc.Empty, allocator, "Cannot read file \"{s}\": {s}", .{ r.prettyPath(fs.Path.init(input_path)), @errorName(err) }) catch unreachable;
}

View File

@@ -2739,6 +2739,7 @@ pub const Resolver = struct {
// ignore them during path resolution.
error.ENOENT,
error.ENOTDIR,
error.EISDIR,
error.IsDir,
error.NotDir,
error.FileNotFound,