File tree Expand file tree Collapse file tree
UniGetUI.PackageEngine.Managers.Cargo
UniGetUI.PackageEngine.Managers.Dotnet
UniGetUI.PackageEngine.Managers.PowerShell7
UniGetUI.PackageEngine.Managers.PowerShell
UniGetUI.PackageEngine.Managers.Vcpkg Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ protected override IReadOnlyList<Package> GetInstalledPackages_UnSafe()
138138
139139 public override IReadOnlyList < string > FindCandidateExecutableFiles ( )
140140 {
141- return CoreTools . WhichMultiple ( "cargo" ) ;
141+ return CoreTools . WhichMultiple ( "cargo.exe " ) ;
142142 }
143143
144144 protected override ManagerStatus LoadManager ( )
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ protected override IReadOnlyList<Package> _getInstalledPackages_UnSafe()
126126
127127 public override IReadOnlyList < string > FindCandidateExecutableFiles ( )
128128 {
129- return CoreTools . WhichMultiple ( "dotnet" ) ;
129+ return CoreTools . WhichMultiple ( "dotnet.exe " ) ;
130130 }
131131
132132 protected override ManagerStatus LoadManager ( )
Original file line number Diff line number Diff line change @@ -118,14 +118,9 @@ protected override IReadOnlyList<Package> _getInstalledPackages_UnSafe()
118118
119119 public override List < string > FindCandidateExecutableFiles ( )
120120 {
121- string path = CoreData . PowerShell5 ;
122- var paths = CoreTools . WhichMultiple ( "powershell" ) ;
123- if ( File . Exists ( path ) && ! paths . Contains ( path , StringComparer . OrdinalIgnoreCase ) )
124- {
125- paths . Add ( path ) ;
126- }
127-
128- return paths ;
121+ var candidates = CoreTools . WhichMultiple ( "powershell.exe" ) ;
122+ if ( candidates . Count is 0 ) candidates . Add ( CoreData . PowerShell5 ) ;
123+ return candidates ;
129124 }
130125
131126 protected override ManagerStatus LoadManager ( )
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ protected override IReadOnlyList<Package> _getInstalledPackages_UnSafe()
118118
119119 public override IReadOnlyList < string > FindCandidateExecutableFiles ( )
120120 {
121- return CoreTools . WhichMultiple ( "pwsh" ) ;
121+ return CoreTools . WhichMultiple ( "pwsh.exe " ) ;
122122 }
123123
124124 protected override ManagerStatus LoadManager ( )
Original file line number Diff line number Diff line change @@ -289,20 +289,16 @@ protected override IReadOnlyList<Package> GetInstalledPackages_UnSafe()
289289
290290 public override IReadOnlyList < string > FindCandidateExecutableFiles ( )
291291 {
292- var FoundPaths = CoreTools . WhichMultiple ( "vcpkg" ) ;
293- List < string > Paths = [ ] ;
292+ var candidates = CoreTools . WhichMultiple ( "vcpkg.exe" ) ;
294293
295- if ( FoundPaths . Any ( ) ) foreach ( var Path in FoundPaths ) Paths . Add ( Path ) ;
296-
297- var ( VcpkgRootFound , VcpkgRoot ) = GetVcpkgRoot ( ) ;
298- if ( VcpkgRootFound )
294+ var ( rootFound , rootPath ) = GetVcpkgRoot ( ) ;
295+ if ( rootFound )
299296 {
300- string VcpkgLocation = Path . Join ( VcpkgRoot , "vcpkg.exe" ) ;
301-
302- if ( File . Exists ( VcpkgLocation ) ) Paths . Add ( VcpkgLocation ) ;
297+ string VcpkgLocation = Path . Join ( rootPath , "vcpkg.exe" ) ;
298+ if ( File . Exists ( VcpkgLocation ) ) candidates . Add ( VcpkgLocation ) ;
303299 }
304300
305- return Paths ;
301+ return candidates ;
306302 }
307303
308304 protected override ManagerStatus LoadManager ( )
You can’t perform that action at this time.
0 commit comments