@@ -257,7 +257,7 @@ private List<PSResourceInfo> ProcessRepositories(
257
257
return allPkgsInstalled ;
258
258
}
259
259
260
- var listOfRepositories = RepositorySettings . Read ( repository , out string [ ] _ ) ;
260
+ List < PSRepositoryInfo > listOfRepositories = RepositorySettings . Read ( repository , out string [ ] _ ) ;
261
261
var yesToAll = false ;
262
262
var noToAll = false ;
263
263
@@ -866,12 +866,12 @@ private string CreateInstallationTempPath()
866
866
867
867
try
868
868
{
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?
875
875
dir . Attributes &= ~ FileAttributes . ReadOnly ;
876
876
}
877
877
catch ( Exception e )
@@ -926,7 +926,7 @@ private bool TryInstallToTempPath(
926
926
try
927
927
{
928
928
var pathToFile = Path . Combine ( tempInstallPath , $ "{ pkgName } .{ normalizedPkgVersion } .zip") ;
929
- using var fs = File . Create ( pathToFile ) ;
929
+ using FileStream fs = File . Create ( pathToFile ) ;
930
930
responseStream . Seek ( 0 , System . IO . SeekOrigin . Begin ) ;
931
931
responseStream . CopyTo ( fs ) ;
932
932
fs . Close ( ) ;
@@ -1105,7 +1105,7 @@ private bool TrySaveNupkgToTempPath(
1105
1105
try
1106
1106
{
1107
1107
var pathToFile = Path . Combine ( tempInstallPath , $ "{ pkgName } .{ normalizedPkgVersion } .zip") ;
1108
- using var fs = File . Create ( pathToFile ) ;
1108
+ using FileStream fs = File . Create ( pathToFile ) ;
1109
1109
responseStream . Seek ( 0 , System . IO . SeekOrigin . Begin ) ;
1110
1110
responseStream . CopyTo ( fs ) ;
1111
1111
fs . Close ( ) ;
@@ -1419,7 +1419,7 @@ private bool DetectClobber(string pkgName, Hashtable parsedMetadataHashtable, ou
1419
1419
}
1420
1420
}
1421
1421
1422
- foreach ( var pkg in pkgsAlreadyInstalled )
1422
+ foreach ( PSResourceInfo pkg in pkgsAlreadyInstalled )
1423
1423
{
1424
1424
List < string > duplicateCmdlets = new ( ) ;
1425
1425
List < string > duplicateCmds = new ( ) ;
0 commit comments