@@ -29,10 +29,11 @@ def main():
2929 parser .add_argument ('--destdir' ,
3030 help = 'The directory the generated sources file will save sources to' ,
3131 default = 'nuget-sources' )
32+ parser .add_argument ('--dotnet-args' , '-a' , nargs = argparse .REMAINDER ,
33+ help = 'Additional arguments to pass to the dotnet command' )
3234 args = parser .parse_args ()
3335
3436 sources = []
35-
3637 with tempfile .TemporaryDirectory (dir = Path ()) as tmp :
3738 def restore_project (project , runtime ):
3839 subprocess .run ([
@@ -42,7 +43,7 @@ def restore_project(project, runtime):
4243 '--command=sh' , f'--runtime=org.freedesktop.Sdk//{ args .freedesktop } ' , '--share=network' ,
4344 '--filesystem=host' , f'org.freedesktop.Sdk.Extension.dotnet{ args .dotnet } //{ args .freedesktop } ' , '-c' ,
4445 f'PATH="${{PATH}}:/usr/lib/sdk/dotnet{ args .dotnet } /bin" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/sdk/dotnet{ args .dotnet } /lib" exec dotnet restore "$@"' ,
45- '--' , '--packages' , tmp , project ] + (['-r' , runtime ] if runtime else []))
46+ '--' , '--packages' , tmp , project ] + (['-r' , runtime ] if runtime else []) + ( args . dotnet_args or []) )
4647
4748 with concurrent .futures .ThreadPoolExecutor () as executor :
4849 futures = []
0 commit comments