avoid ugly messages when running ikiwiki -setup on a *directory*
authorJoey Hess <joey@gnu.kitenet.net>
Wed, 23 Sep 2009 18:56:18 +0000 (14:56 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 23 Sep 2009 18:56:18 +0000 (14:56 -0400)
IkiWiki/Setup.pm

index 6ee11209624a20a1a0080852b6f4a64dda756543..8a25ecc575da894711d27e4583e6ab491b350a45 100644 (file)
@@ -20,8 +20,9 @@ sub load ($) {
        my $code;
        {
                local $/=undef;
-               $code=<IN>;
+               $code=<IN> || error("$setup: $!");
        }
+       
        ($code)=$code=~/(.*)/s;
        close IN;