From c46ba2b2421043f61b7eccce131aa4b1fc75d264 Mon Sep 17 00:00:00 2001 From: Meghan Date: Sun, 29 Nov 2020 05:39:20 -0800 Subject: [PATCH] revert modfile init catch --- src/util/modfile.zig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/util/modfile.zig b/src/util/modfile.zig index be643430612a52e7350816c34bd87cb54530a8e7..62ab2cbc45154cfab8085dba230c1dc89d27c2a6 100644 --- a/src/util/modfile.zig +++ b/src/util/modfile.zig @@ -23,13 +23,7 @@ pub const ModFile = struct { pub fn init(alloc: *std.mem.Allocator, fpath: []const u8) !Self { // - const mpath = try std.fs.realpathAlloc(alloc, fpath) catch |e| switch (e) { - error.FileNotFound => { - u.assert(false, "zig.mod file not found in the current directory, run 'zigmod init' to get started.", .{}); - unreachable; - }, - else => e, - }; + const mpath = try std.fs.realpathAlloc(alloc, fpath); const file = try std.fs.openFileAbsolute(mpath, .{}); defer file.close(); const input = try file.reader().readAllAlloc(alloc, mb); -- 2.54.0