From 3ea581c253355f3bf04ec89531cf62e93c790193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 20 Dec 2024 11:12:02 +0100 Subject: [PATCH] Add missing duplicate filter --- lib/package.gi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/package.gi b/lib/package.gi index d394843f48..3827d40007 100644 --- a/lib/package.gi +++ b/lib/package.gi @@ -304,8 +304,12 @@ InstallGlobalFunction( InitializePackagesInfoRecords, function( arg ) # the first time this is called, add the cmd line args to the list if IsEmpty(GAPInfo.PackageDirectories) then for pkgdirstrs in GAPInfo.CommandLineOptions.packagedirs do - pkgdirs:= List( SplitString( pkgdirstrs, ";" ), Directory); - APPEND_LIST_INTR( GAPInfo.PackageDirectories, pkgdirs ); + pkgdirs:= List( SplitString( pkgdirstrs, ";" ), Directory ); + for pkgdir in pkgdirs do + if not pkgdir in GAPInfo.PackageDirectories then + Add( GAPInfo.PackageDirectories, pkgdir ); + fi; + od; od; fi; # add any new pkg directories to the list