|
|
|
@ -159,7 +159,33 @@ public class DependencyLoader
|
|
|
|
|
private IEnumerable<PackageSource> GetPackageSources(IEnumerable<string> sources)
|
|
|
|
|
{
|
|
|
|
|
foreach (var source in sources)
|
|
|
|
|
yield return new PackageSource(source);
|
|
|
|
|
{
|
|
|
|
|
var packageSource = new PackageSource(source);
|
|
|
|
|
|
|
|
|
|
if (Uri.TryCreate(source, UriKind.RelativeOrAbsolute, out var sourceUri))
|
|
|
|
|
{
|
|
|
|
|
if (!sourceUri.IsAbsoluteUri)
|
|
|
|
|
packageSource = new PackageSource(Path.GetFullPath(source));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//if (packageSource.IsLocal || packageSource.TrySourceAsUri is null)
|
|
|
|
|
//{
|
|
|
|
|
// /*
|
|
|
|
|
// * Suspected local, verify
|
|
|
|
|
// */
|
|
|
|
|
// var local = Directory.Exists(source);
|
|
|
|
|
// if (local)
|
|
|
|
|
// {
|
|
|
|
|
// /*
|
|
|
|
|
// * If it's a cache, add all folders to sources
|
|
|
|
|
// */
|
|
|
|
|
// foreach (var directorySource in GetPackageSources(Directory.GetDirectories(source)))
|
|
|
|
|
// yield return directorySource;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
yield return packageSource;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|