commit d95864cd5d79ee17fbd13a3ab18ffd394b27f83a from: Stefan Sperling via: Thomas Adam date: Fri Apr 14 16:27:25 2023 UTC make gotd/gitwrapper start up even if a repository is missing on disk This should result in more useful behaviour when gitwrapper runs and repositories listed in gotd.conf do not yet exist or do no longer exist. commit - f9542c24c5340ee3ab60b432efa61c97bcc04381 commit + d95864cd5d79ee17fbd13a3ab18ffd394b27f83a blob - 7194fcd4fc0a0849d456781ccae9c9b86c49448b blob + eb736f63ba59501f38728a4c2a6c5c0c4a1e7eec --- gotd/parse.y +++ gotd/parse.y @@ -309,9 +309,19 @@ repoopts1 : PATH STRING { YYERROR; } if (realpath($2, new_repo->path) == NULL) { - yyerror("realpath %s: %s", $2, strerror(errno)); - free($2); - YYERROR; + yyerror("realpath %s: %s", $2, + strerror(errno)); + /* + * Give admin a chance to create + * missing repositories at run-time. + */ + if (errno != ENOENT) { + free($2); + YYERROR; + } else if (strlcpy(new_repo->path, $2, + sizeof(new_repo->path)) >= + sizeof(new_repo->path)) + yyerror("path too long"); } } free($2);