run-command: mark path lookup errors with ENOENT
[gitweb.git] / t / helper / test-submodule-config.c
index 61049b87a07c638a9211b11484c503ffc56a1f9e..c6c57bba0d397e44e8897b05d479a30b53311517 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "config.h"
 #include "submodule-config.h"
 #include "submodule.h"
 
@@ -23,7 +24,7 @@ int cmd_main(int argc, const char **argv)
 
        arg++;
        my_argc--;
-       while (starts_with(arg[0], "--")) {
+       while (arg[0] && starts_with(arg[0], "--")) {
                if (!strcmp(arg[0], "--url"))
                        output_url = 1;
                if (!strcmp(arg[0], "--name"))