diff options
author | 2025-04-11 13:15:54 -0700 | |
---|---|---|
committer | 2025-04-11 13:15:54 -0700 | |
commit | e4b37f2b2691fb6c6821e3dd4a4dcabf86b5801f (patch) | |
tree | fe2fc16a7bd1be9629655341efa49728e37d5064 /src/config.c | |
parent | c43c233c9b14e65d461405857c6e6c758cd9fb23 (diff) | |
download | github-mirror-e4b37f2b2691fb6c6821e3dd4a4dcabf86b5801f.tar.gz github-mirror-e4b37f2b2691fb6c6821e3dd4a4dcabf86b5801f.tar.zst github-mirror-e4b37f2b2691fb6c6821e3dd4a4dcabf86b5801f.zip |
Add option to skip forks
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index 154127e..a80aefb 100644 --- a/src/config.c +++ b/src/config.c @@ -170,7 +170,19 @@ static int parse_line_inner(struct config *cfg, enum config_section section, cfg->head->user_agent = value; else if (!strcmp(key, "owner")) cfg->head->owner = value; - else { + else if (!strcmp(key, "skip-forks")) { + if (!strcmp(value, "true")) + cfg->head->skip_forks = 1; + else if (!strcmp(value, "false")) + cfg->head->skip_forks = 0; + else { + fprintf(stderr, + "Error parsing config file: " + "invalid value for skip-forks: %s\n", + value); + return -1; + } + } else { fprintf(stderr, "Error parsing config file: unknown key: %s\n", key); |