aboutsummaryrefslogtreecommitdiff
path: root/strip-store-paths
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2022-01-06 13:24:35 +1100
committerJustin Bedo <cu@cua0.org>2022-01-06 13:24:35 +1100
commit51951403ec33c415df715d8db5ebfcd0bbebcb7f (patch)
treeeec9303f76acdfa68df1f7ca7c56b6b4e31145ca /strip-store-paths
parentcc7f641de6517706742875f2ec4e09b12ab0a6d4 (diff)
strip-store-paths: allow no files
Diffstat (limited to 'strip-store-paths')
-rw-r--r--strip-store-paths/strip-store-paths.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/strip-store-paths/strip-store-paths.zig b/strip-store-paths/strip-store-paths.zig
index 9ded95e..69ed2db 100644
--- a/strip-store-paths/strip-store-paths.zig
+++ b/strip-store-paths/strip-store-paths.zig
@@ -27,7 +27,9 @@ pub fn main() !void {
const allocator = arena.allocator();
const args = try std.process.argsAlloc(allocator);
- if (args.len != 2) {
+ if (args.len == 1) {
+ std.os.exit(0);
+ } else if (args.len > 2) {
std.debug.print("usage: {s} file\n", .{args[0]});
std.os.exit(1);
}