Replace GetFiles in TestModuleManifestCommand (#14317)
This commit is contained in:
parent
cb13c30467
commit
f74acaa768
|
@ -420,23 +420,13 @@ namespace Microsoft.PowerShell.Commands
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var allFiles = Directory.GetFiles(gacPath, assemblyFile, SearchOption.AllDirectories);
|
return Directory.EnumerateFiles(gacPath, assemblyFile, SearchOption.AllDirectories).Any()
|
||||||
|
|| Directory.EnumerateFiles(gacPath, ngenAssemblyFile, SearchOption.AllDirectories).Any();
|
||||||
if (allFiles.Length == 0)
|
|
||||||
{
|
|
||||||
var allNgenFiles = Directory.GetFiles(gacPath, ngenAssemblyFile, SearchOption.AllDirectories);
|
|
||||||
if (allNgenFiles.Length == 0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue