main: trivial errors
This commit is contained in:
parent
c294d149fc
commit
2e4229d613
@ -51,7 +51,7 @@ pub fn build(b: *zbs.Builder) void {
|
|||||||
cmph.addIncludeDir("include/deps/cmph");
|
cmph.addIncludeDir("include/deps/cmph");
|
||||||
|
|
||||||
{
|
{
|
||||||
const exe = b.addExecutable("turbo-unix2db", "cli/unix2db/main.zig");
|
const exe = b.addExecutable("turbo-unix2db", "src/unix2db/main.zig");
|
||||||
exe.setTarget(target);
|
exe.setTarget(target);
|
||||||
exe.setBuildMode(mode);
|
exe.setBuildMode(mode);
|
||||||
addCmphDeps(exe, cmph);
|
addCmphDeps(exe, cmph);
|
||||||
|
@ -26,12 +26,14 @@ const usage =
|
|||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
// This line is here because of https://github.com/ziglang/zig/issues/7807
|
// This line is here because of https://github.com/ziglang/zig/issues/7807
|
||||||
const argv: []const [*:0]const u8 = os.argv;
|
const argv: []const [*:0]const u8 = os.argv;
|
||||||
const gpa = GeneralPurposeAllocator(.{});
|
var gpa = GeneralPurposeAllocator(.{}){};
|
||||||
|
defer gpa.deinit();
|
||||||
|
const allocator = gpa.allocator();
|
||||||
|
|
||||||
const stderr = try io.getStdErr();
|
const stderr = io.getStdErr().writer();
|
||||||
const stdout = try io.getStdOut();
|
const stdout = io.getStdOut().writer();
|
||||||
|
|
||||||
const return_code = execute(gpa, stdout, stderr, argv[1..]);
|
const return_code = execute(allocator, stdout, stderr, argv[1..]);
|
||||||
os.exit(return_code);
|
os.exit(return_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user