aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix6
-rw-r--r--strip-store-paths/strip-store-paths.zig4
2 files changed, 4 insertions, 6 deletions
diff --git a/default.nix b/default.nix
index 1c550b8..3ec0450 100644
--- a/default.nix
+++ b/default.nix
@@ -151,11 +151,7 @@ let
stripCommand = ''
function rewriteOutput {
- if [ -f ''${!1} ] ; then
- strip-store-paths ''${!1}
- else
- find ''${!1} -type f -print0 | xargs -0 -n1 strip-store-paths
- fi
+ find ''${!1} -type f -print0 | xargs -0 -n1 strip-store-paths
}
for o in $outputs ; do
rewriteOutput $o
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);
}