| ... | ... | @@ -2986,13 +2986,7 @@ pub fn cmdFmt(gpa: *Allocator, args: []const []const u8) !void { |
| 2986 | 2986 | defer fmt.out_buffer.deinit(); |
| 2987 | 2987 | |
| 2988 | 2988 | for (input_files.items) |file_path| { |
| 2989 | | // Get the real path here to avoid Windows failing on relative file paths with . or .. in them. |
| 2990 | | const real_path = fs.realpathAlloc(gpa, file_path) catch |err| { |
| 2991 | | fatal("unable to open '{s}': {s}", .{ file_path, @errorName(err) }); |
| 2992 | | }; |
| 2993 | | defer gpa.free(real_path); |
| 2994 | | |
| 2995 | | try fmtPath(&fmt, file_path, check_flag, fs.cwd(), real_path); |
| 2989 | try fmtPath(&fmt, file_path, check_flag, fs.cwd(), file_path); |
| 2996 | 2990 | } |
| 2997 | 2991 | if (fmt.any_error) { |
| 2998 | 2992 | process.exit(1); |