Skip to content

Commit

Permalink
fix package_get function if non existent package
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Jun 2, 2024
1 parent 81597ee commit f5aeb9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/data/repository.vala
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ public package get_package_from_repository (string name) {
//DOC: `package get_package (string name):`
//DOC: get package from automatically detected source
public package get_package (string name) {
package p = null;
if (isfile(name)){
return get_package_from_file(name);
p = get_package_from_file(name);
}else if (is_available_from_repository(name)) {
return get_from_repository(name);
p = get_from_repository(name);
} else if (is_installed_package(name)) {
return get_installed_package(name);
}else {
return new package();
p = get_installed_package(name);
}
return p;
}


Expand Down
1 change: 1 addition & 0 deletions src/operations/package-manager/info.vala
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static void info_init() {
"i"
};
op.help.name = _("info");
op.help.minargs = 1;
op.help.description = _("Get informations from package manager databases.");
op.help.add_parameter("--deps", _("list required packages"));
op.help.add_parameter("--revdeps", _("list packages required by package"));
Expand Down

0 comments on commit f5aeb9f

Please sign in to comment.