authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2021-07-08 17:38:59 -07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2021-07-08 17:38:59 -07:00
log2cff5668bacdd7699fcc3c2f3288cfe39e24faa7
tree203a7bc9c36581a697ec98eeccb3afa3556c2922
parent752137bf1b5b820dfbb29f835071a37f9e235d54
parent93950d9a7c4cd155849eb441e641681e8fafd52c
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #19 from frmdstryr/patch-1

Add a message if build.zig file is not present

1 files changed, 1 insertions(+), 0 deletions(-)

src/cmd/init.zig+1
......@@ -26,6 +26,7 @@ fn detect_pkgname(def: []const u8) ![]const u8 {
2626 if (def.len > 0) {
2727 return def;
2828 }
29 u.assert(try u.does_file_exist("build.zig"), "init requires a build.zig file", .{});
2930 const dpath = try std.fs.cwd().realpathAlloc(gpa, "build.zig");
3031 const split = try u.split(dpath, std.fs.path.sep_str);
3132 var name = split[split.len - 2];