Mercurial > hg > octave-lyh
diff scripts/pkg/pkg.m @ 9220:70177bf9cc16
Fix bug when calling pkg describe to check whether a package is installed
author | Carlo de Falco <kingcrimson@tiscali.it> |
---|---|
date | Tue, 19 May 2009 15:59:37 +0200 |
parents | 5247e89688e1 |
children | a653c61ee98c |
line wrap: on
line diff
--- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -1000,9 +1000,14 @@ endfor non_inst = find (strcmp (flag, "Not installed")); - if (! isempty (non_inst) && nargout < 2) - non_inst_str = sprintf (" %s ", pkgnames{non_inst}); - error ("some packages are not installed: %s", non_inst_str); + if (! isempty (non_inst)) + if (nargout < 2) + non_inst_str = sprintf (" %s ", pkgnames{non_inst}); + error ("some packages are not installed: %s", non_inst_str); + else + pkg_desc_list{non_inst} = struct ("name", {}, "description", + {}, "provides", {}); + endif endif if (nargout == 0)