Skip to content

Commit

Permalink
No need to warn twice about unknown keyword (fixes: #381)
Browse files Browse the repository at this point in the history
  • Loading branch information
bapt committed Dec 20, 2012
1 parent d174f74 commit 0d5fb7d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions libpkg/pkg_ports.c
Expand Up @@ -683,13 +683,8 @@ external_keyword(struct plist *plist, char *keyword, char *line)
"%s/%s.yaml", keyword_dir, keyword);
}

if ((fp = fopen(keyfile_path, "r")) == NULL) {
if (errno == ENOENT)
pkg_emit_errno("Unable to open keyword definition",
keyfile_path);

if ((fp = fopen(keyfile_path, "r")) == NULL)
return (EPKG_UNKNOWN);
}

yaml_parser_initialize(&parser);
yaml_parser_set_input_file(&parser, fp);
Expand Down

0 comments on commit 0d5fb7d

Please sign in to comment.