comparison scripts/pkg/pkg.m @ 20515: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
comparison
equal deleted inserted replaced
20514:ac0f7acdc3fd 20515:ad7fe3cb6fd2
366 local_packages = list_forge_packages (); 366 local_packages = list_forge_packages ();
367 else 367 else
368 list_forge_packages (); 368 list_forge_packages ();
369 endif 369 endif
370 else 370 else
371 if (nargout) 371 if (nargout == 1)
372 local_packages = installed_packages (local_list, global_list, files);
373 elseif (nargout > 1)
372 [local_packages, global_packages] = installed_packages (local_list, 374 [local_packages, global_packages] = installed_packages (local_list,
373 global_list, 375 global_list,
374 files); 376 files);
375 else 377 else
376 installed_packages (local_list, global_list, files); 378 installed_packages (local_list, global_list, files);