irods/irods_client_icommands

imeta rm uncaught exception if too few arguments

kellerb opened this issue · 1 comments

$ iput VERSION.json
$ imeta rm -d VERSION.json a

Error: Not enough arguments provided to rm

terminating with uncaught exception of type boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_any_cast> >: boost::bad_any_cast: failed conversion using boost::any_cast
Aborted (core dumped)

The existence of the "value" argument is checked for here, but it is then unconditionally used here.

After brief inspection, should probably return early with something like SYS_INVALID_INPUT_PARAM.

This error is repeated throughout the file.

trel commented

Fixed by commits against #27 - shipped with 4.2.3.