From 43cd55c5aa38e8268dbdc377b46226f3a234d596 Mon Sep 17 00:00:00 2001 From: Bob Farrell Date: Wed, 6 Nov 2024 18:35:17 +0000 Subject: [PATCH] WIP --- cli/commands/generate/migration.zig | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cli/commands/generate/migration.zig b/cli/commands/generate/migration.zig index 0d6194c..901d69c 100644 --- a/cli/commands/generate/migration.zig +++ b/cli/commands/generate/migration.zig @@ -37,5 +37,15 @@ pub fn run(allocator: std.mem.Allocator, cwd: std.fs.Dir, args: [][]const u8, he .command = command, }, ); - try migration.save(); + const path = migration.save() catch |err| { + switch (err) { + error.InvalidMigrationCommand => { + std.log.err("Invalid migration command: {?s}", .{command}); + return; + }, + else => return err, + } + }; + + std.log.info("Saved migration: {s}", .{path}); }