Mercurial > hg > octave-nkf
diff scripts/pkg/pkg.m @ 20690:ad7fe3cb6fd2
pkg: fix regression on output of pkg list (bug #45873)
* scripts/pkg/pkg.m: cset 7fa1970a655d reduced the checks to nargout to
is there nargout or not. However, the subfunction installed_packages()
returns alternative things based on its own nargout (it probably should
not since that makes for a messy code). Fix, pkg to call the subfunction
correctly based on its nargout too (but still, use "nargout > 1" instead
of "nargout == 2".
* scripts/pkg/private/installed_packages.m: do not check for exact number
of nargout and reduce number of function return points.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Fri, 04 Sep 2015 18:47:54 +0100 |
parents | 7fa1970a655d |
children |
line wrap: on
line diff
--- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -368,7 +368,9 @@ list_forge_packages (); endif else - if (nargout) + if (nargout == 1) + local_packages = installed_packages (local_list, global_list, files); + elseif (nargout > 1) [local_packages, global_packages] = installed_packages (local_list, global_list, files);