@@ -257,7 +257,7 @@ private List<PSResourceInfo> ProcessRepositories(
257257 return allPkgsInstalled ;
258258 }
259259
260- var listOfRepositories = RepositorySettings . Read ( repository , out string [ ] _ ) ;
260+ List < PSRepositoryInfo > listOfRepositories = RepositorySettings . Read ( repository , out string [ ] _ ) ;
261261 var yesToAll = false ;
262262 var noToAll = false ;
263263
@@ -866,12 +866,12 @@ private string CreateInstallationTempPath()
866866
867867 try
868868 {
869- var dir = Directory . CreateDirectory ( tempInstallPath ) ; // should check it gets created properly
870- // To delete file attributes from the existing ones get the current file attributes first and use AND (&) operator
871- // with a mask (bitwise complement of desired attributes combination).
872- // TODO: check the attributes and if it's read only then set it
873- // attribute may be inherited from the parent
874- // TODO: are there Linux accommodations we need to consider here?
869+ DirectoryInfo dir = Directory . CreateDirectory ( tempInstallPath ) ; // should check it gets created properly
870+ // To delete file attributes from the existing ones get the current file attributes first and use AND (&) operator
871+ // with a mask (bitwise complement of desired attributes combination).
872+ // TODO: check the attributes and if it's read only then set it
873+ // attribute may be inherited from the parent
874+ // TODO: are there Linux accommodations we need to consider here?
875875 dir . Attributes &= ~ FileAttributes . ReadOnly ;
876876 }
877877 catch ( Exception e )
@@ -926,7 +926,7 @@ private bool TryInstallToTempPath(
926926 try
927927 {
928928 var pathToFile = Path . Combine ( tempInstallPath , $ "{ pkgName } .{ normalizedPkgVersion } .zip") ;
929- using var fs = File . Create ( pathToFile ) ;
929+ using FileStream fs = File . Create ( pathToFile ) ;
930930 responseStream . Seek ( 0 , System . IO . SeekOrigin . Begin ) ;
931931 responseStream . CopyTo ( fs ) ;
932932 fs . Close ( ) ;
@@ -1105,7 +1105,7 @@ private bool TrySaveNupkgToTempPath(
11051105 try
11061106 {
11071107 var pathToFile = Path . Combine ( tempInstallPath , $ "{ pkgName } .{ normalizedPkgVersion } .zip") ;
1108- using var fs = File . Create ( pathToFile ) ;
1108+ using FileStream fs = File . Create ( pathToFile ) ;
11091109 responseStream . Seek ( 0 , System . IO . SeekOrigin . Begin ) ;
11101110 responseStream . CopyTo ( fs ) ;
11111111 fs . Close ( ) ;
@@ -1419,7 +1419,7 @@ private bool DetectClobber(string pkgName, Hashtable parsedMetadataHashtable, ou
14191419 }
14201420 }
14211421
1422- foreach ( var pkg in pkgsAlreadyInstalled )
1422+ foreach ( PSResourceInfo pkg in pkgsAlreadyInstalled )
14231423 {
14241424 List < string > duplicateCmdlets = new ( ) ;
14251425 List < string > duplicateCmds = new ( ) ;
0 commit comments