Skip to content

Commit

Permalink
bee-dep: exit with error if DEPENDENCIES files is empty!
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Nov 29, 2011
1 parent 29cb8b5 commit bdbba59
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@ int graph_insert_nodes(struct hash *hash, char *filename)
return EXIT_FAILURE;
}

if(line_cnt == 0) {
fprintf(stderr, "bee-dep: error: file '%s' is empty\n", filename);
/* WTF: why can't we return 0 here for errors ??? */
return EXIT_FAILURE;
}

/* we dont't want to exit on success ??? or do we? i don't get it! */
/* but works for me now.. 8) */
return EXIT_SUCCESS;
}

Expand Down

0 comments on commit bdbba59

Please sign in to comment.