Fix analyzer warning that is breaking the build (#90136)
authorEirik Tsarpalis <eirik.tsarpalis@gmail.com>
Tue, 8 Aug 2023 07:50:11 +0000 (10:50 +0300)
committerGitHub <noreply@github.com>
Tue, 8 Aug 2023 07:50:11 +0000 (09:50 +0200)
src/tasks/MobileBuildTasks/Apple/AppleProject.cs

index ed3c2c5..4ddea07 100644 (file)
@@ -121,9 +121,8 @@ namespace Microsoft.Apple.Build
                 }
                 else
                 {
-                    if (!libDirs.Contains(rootPath))
+                    if (libDirs.Add(rootPath))
                     {
-                        libDirs.Add(rootPath);
                         ret.Append($"-L {rootPath} ");
                     }
                     ret.Append($"-l{libName} ");