Tag tree fix for #64, validate required argument in exec-script

This commit is contained in:
2020-06-25 20:11:30 -04:00
parent d3c8928fe8
commit 8ffe780ab2
11 changed files with 70 additions and 19 deletions

View File

@@ -367,6 +367,11 @@ web_args_t *web_args_create() {
int exec_args_validate(exec_args_t *args, int argc, const char **argv) {
if (argc < 2) {
fprintf(stderr, "Required positional argument: PATH.\n");
return 1;
}
char *index_path = abspath(argv[1]);
if (index_path == NULL) {
fprintf(stderr, "File not found: %s\n", argv[1]);