Skip to content

Commit

Permalink
Add cmd line arg
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Dec 18, 2024
1 parent 99e7acb commit f921142
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/package.gi
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ InstallGlobalFunction( InitializePackagesInfoRecords, function( arg )
LogPackageLoadingMessage( PACKAGE_DEBUG,
"entering InitializePackagesInfoRecords", "GAP" );

# the first time this is called, add the cmd line args to the list
if IsEmpty(GAPInfo.PackageDirectories) then
APPEND_LIST_INTR( GAPInfo.PackageDirectories,
List( GAPInfo.CommandLineOptions.packagedirs, Directory )
);
fi;
# add any new pkg directories to the list
pkgdirs:= DirectoriesLibrary( "pkg" );
if pkgdirs <> fail then
Expand Down
3 changes: 3 additions & 0 deletions lib/system.g
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ BIND_GLOBAL( "GAPInfo", rec(
"directories to the end/start of existing list",
"of root paths" ] ),
rec( short:= "r", default := false, help := ["disable/enable user GAP root dir", "GAPInfo.UserGapRoot"] ),
rec( long := "packagedirs", default := [], arg := "<paths>",
help := [ "set or modify the GAP directory paths",
"Directories are separated using ';'." ] ),
,
rec( section:= ["Loading:"] ),
rec( short:= "A", default := false, help := ["disable/enable autoloading of suggested", "GAP packages"] ),
Expand Down

0 comments on commit f921142

Please sign in to comment.