Skip to content

Commit

Permalink
turn the package name to lowercase
Browse files Browse the repository at this point in the history
`DirectoriesPackagePrograms( <name> )` wants to check
whether the package `<name>` is already available,
but it does not make sure that `<name>` is in lowercase.
Thus the package may be erroneously regarded as not yet loaded,
and if several versions of the package are installed
then the path for the highest version is taken, which may be wrong.
  • Loading branch information
ThomasBreuer committed May 18, 2020
1 parent b5a0e52 commit b1ba3c8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/package.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,7 @@ InstallGlobalFunction( DirectoriesPackagePrograms, function( name )

# We are not allowed to call
# `InstalledPackageVersion', `TestPackageAvailability' etc.
name:= LowercaseString( name );
info:= PackageInfo( name );
if IsBound( GAPInfo.PackagesLoaded.( name ) ) then
# The package is already loaded.
Expand Down

0 comments on commit b1ba3c8

Please sign in to comment.