diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index ee020d4749..6ba8587b6d 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -1042,7 +1042,7 @@ static int module_deinit(int argc, const char **argv, const char *prefix) die(_("Use '--all' if you really want to deinitialize all submodules")); if (module_list_compute(argc, argv, prefix, &pathspec, &list) < 0) - BUG("module_list_compute should not choke on empty pathspec"); + return 1; info.prefix = prefix; if (quiet)