@@ -68,7 +68,7 @@ public static async Task<bool> CheckRuntimeAsync(string runtime, bool runAsUser)
6868 return false ;
6969 }
7070
71- public static async Task < List < NugetSource > > GenerateSourcesAsync ( string input , int dotnetVersion , string ? freedesktopVersion , string ? temp , bool selfContained , bool runAsUser )
71+ public static async Task < List < NugetSource > > GenerateSourcesAsync ( string input , int dotnetVersion , string ? freedesktopVersion , string ? temp , bool selfContained , bool runAsUser , string ? destinationName )
7272 {
7373 input = input . Replace ( "~" , Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) ) ;
7474 freedesktopVersion = freedesktopVersion ?? "25.08" ;
@@ -141,7 +141,7 @@ public static async Task<List<NugetSource>> GenerateSourcesAsync(string input, i
141141 {
142142 Url = $ "https://api.nuget.org/v3-flatcontainer/{ name } /{ version } /{ filename } ",
143143 Sha512 = hash ,
144- Destination = "nuget-sources" ,
144+ Destination = destinationName ?? "nuget-sources" ,
145145 DestinationFileName = filename
146146 } ) ;
147147 }
@@ -158,7 +158,7 @@ public static async Task<List<NugetSource>> GenerateSourcesAsync(string input, i
158158 "microsoft.netcore.app.runtime.linux-x64"
159159 } )
160160 {
161- var extraSource = await GetExtraSourceAsync ( extra ) ;
161+ var extraSource = await GetExtraSourceAsync ( extra , destinationName ) ;
162162 if ( extraSource is not null )
163163 {
164164 sources . Add ( extraSource ) ;
@@ -185,7 +185,7 @@ public static async Task WriteSourcesFileAsync(List<NugetSource> sources, string
185185 Console . WriteLine ( $ "[Info] Sources file written to { Path . GetFullPath ( output ) } ") ;
186186 }
187187
188- private static async Task < NugetSource ? > GetExtraSourceAsync ( string name )
188+ private static async Task < NugetSource ? > GetExtraSourceAsync ( string name , string ? destinationName )
189189 {
190190 name = name . ToLower ( ) ;
191191 var catalog = await HttpClient . GetFromJsonAsync < NugetCatalog > ( $ "https://api.nuget.org/v3/registration5-semver1/{ name } /index.json", JsonSerializerOptions ) ;
@@ -214,7 +214,7 @@ public static async Task WriteSourcesFileAsync(List<NugetSource> sources, string
214214 {
215215 Url = $ "https://api.nuget.org/v3-flatcontainer/{ name } /{ latestEntry . Version } /{ filename } ",
216216 Sha512 = Convert . ToHexString ( Convert . FromBase64String ( latestEntry . PackageHash ) ) . ToLower ( ) ,
217- Destination = "nuget-sources" ,
217+ Destination = destinationName ?? "nuget-sources" ,
218218 DestinationFileName = filename
219219 } ;
220220 }
0 commit comments