Skip to content

Commit 0833209

Browse files
authored
Merge pull request openSUSE#145 from aschnell/master
- added check
2 parents ce8c075 + 641a591 commit 0833209

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

barrel/handle.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ namespace barrel
150150

151151
get_opts.parse(GetOpts::no_ext_options);
152152

153+
// Interactive_ignore_line should ensure that there is at least one argument.
154+
if (!get_opts.has_args())
155+
throw runtime_error("main command missing");
156+
153157
const char* command1 = get_opts.pop_arg();
154158
vector<MainCmd>::const_iterator main_cmd = sloppy_find(main_cmds, command1);
155159

0 commit comments

Comments
 (0)