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; }