Skip to content

Commit

Permalink
Fixed the code for getting the packages.
Browse files Browse the repository at this point in the history
Wasn't quite sure how to do it before, but I figured it out.
  • Loading branch information
DrewNaylor committed Oct 25, 2020
1 parent 5ffd7c7 commit 7dd905b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions libguinget/PackageTools.vb
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,11 @@ Public Class PackageTools

' Define CMD args by going through the list of packages.
' Be sure to only add && if there are packages left to add.
Dim BulkInstallCommandList As String = "/k "
For Each Package As String In PackageIDs
For Each Version As String In PackageVersions
' Begin adding packages to the list.
BulkInstallCommandList = "winget install --id " & Package & " -v " & Version & InteractiveFlag & " -e"
'
Next
Dim BulkInstallCommandList As String = String.Empty
For i As Integer = 0 To PackageIDs.Count - 1
' Begin adding packages to the list.
BulkInstallCommandList = BulkInstallCommandList & "winget install --id " & PackageIDs(i) & " -v " & PackageVersions(i) & InteractiveFlag & " -e"
'
Next

MessageBox.Show(BulkInstallCommandList.ToString)
Expand Down

0 comments on commit 7dd905b

Please sign in to comment.