diff --git a/cli/src/errors.zig b/cli/src/errors.zig index 388c196..5df98f8 100644 --- a/cli/src/errors.zig +++ b/cli/src/errors.zig @@ -1,5 +1,5 @@ const std = @import("std"); -const colors = @import("utils/colors.zig"); +const io = @import("utils/io.zig"); const crypto = @import("utils/crypto.zig"); /// User-friendly error types for CLI @@ -143,18 +143,18 @@ pub const ErrorHandler = struct { const message = ErrorMessages.getMessage(err); const suggestion = ErrorMessages.getSuggestion(err); - colors.printError("Error: {s}\n", .{message}); + io.printError("Error: {s}\n", .{message}); if (context) |ctx| { - colors.printWarning("Context: {s}\n", .{ctx}); + io.printWarning("Context: {s}\n", .{ctx}); } if (suggestion) |sug| { - colors.printInfo("Suggestion: {s}\n", .{sug}); + io.printInfo("Suggestion: {s}\n", .{sug}); } if (ErrorMessages.isUserFixable(err)) { - colors.printInfo("This error can be fixed by updating your configuration.\n", .{}); + io.printInfo("This error can be fixed by updating your configuration.\n", .{}); } } @@ -169,16 +169,16 @@ pub const ErrorHandler = struct { const suggestion = ErrorMessages.getSuggestion(err); const is_fixable = ErrorMessages.isUserFixable(err); - colors.printError("Error in '{s}': {s}\n", .{ command, message }); + io.printError("Error in '{s}': {s}\n", .{ command, message }); if (suggestion) |sug| { - colors.printInfo("Suggestion: {s}\n", .{sug}); + io.printInfo("Suggestion: {s}\n", .{sug}); } if (is_fixable) { - colors.printInfo("This is a user-fixable issue.\n", .{}); + io.printInfo("This is a user-fixable issue.\n", .{}); } else { - colors.printWarning("If this persists, check server logs or contact support.\n", .{}); + io.printWarning("If this persists, check server logs or contact support.\n", .{}); } // Exit with appropriate code