Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Mongo2Go/Helper/MongoBinaryLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class MongoBinaryLocator : IMongoBinaryLocator
{
private readonly string _nugetPrefix = Path.Combine("packages", "Mongo2Go*");
private readonly string _nugetCachePrefix = Path.Combine("packages", "mongo2go", "*");
private readonly string _nugetCacheBasePrefix = Path.Combine("mongo2go", "*");
public const string DefaultWindowsSearchPattern = @"tools\mongodb-windows*\bin";
public const string DefaultLinuxSearchPattern = "*/tools/mongodb-linux*/bin";
public const string DefaultOsxSearchPattern = "tools/mongodb-macos*/bin";
Expand Down Expand Up @@ -86,7 +87,9 @@ private string FindBinariesDirectory(IList<string> searchDirectories)
// Next try the search pattern with nuget installation prefix
directory.FindFolderUpwards(Path.Combine(_nugetPrefix, _searchPattern)) ??
// Finally try the search pattern with the nuget cache prefix
directory.FindFolderUpwards(Path.Combine(_nugetCachePrefix, _searchPattern));
directory.FindFolderUpwards(Path.Combine(_nugetCachePrefix, _searchPattern)) ??
// Finally try the search pattern with the basic nuget cache prefix
directory.FindFolderUpwards(Path.Combine(_nugetCacheBasePrefix, _searchPattern));
if (binaryFolder != null) return binaryFolder;
}
throw new MonogDbBinariesNotFoundException(
Expand Down