From 9334b84d6fd04a2299b9e4bb2ef4f020cd614f39 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 13 Aug 2014 16:29:00 +0200 Subject: [PATCH] Fix registerRoot Fixes #175. --- src/lib/Hydra/Helper/Nix.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/Hydra/Helper/Nix.pm b/src/lib/Hydra/Helper/Nix.pm index 9705fb9d..57db29c8 100644 --- a/src/lib/Hydra/Helper/Nix.pm +++ b/src/lib/Hydra/Helper/Nix.pm @@ -79,6 +79,7 @@ sub gcRootFor { sub registerRoot { my ($path) = @_; my $link = gcRootFor $path; + return if -e $link; open ROOT, ">$link" or die "cannot create GC root `$link' to `$path'"; close ROOT; }