| ... | ... | @@ -25,8 +25,8 @@ fn detect_pkgname(def: []const u8) ![]const u8 { |
| 25 | 25 | if (def.len > 0) { |
| 26 | 26 | return def; |
| 27 | 27 | } |
| 28 | | const dpath = try std.fs.realpathAlloc(gpa, "./"); |
| 29 | | const split = try u.split(dpath, "/"); |
| 28 | const dpath = try std.fs.cwd().realpathAlloc(gpa, "."); |
| 29 | const split = try u.split(dpath, std.fs.path.sep_str); |
| 30 | 30 | var name = split[split.len-1]; |
| 31 | 31 | name = u.trim_prefix(name, "zig-"); |
| 32 | 32 | u.assert(name.len > 0, "package name must not be an empty string", .{}); |