@@ -10,21 +10,24 @@ namespace ScriptCs.Command
1010 internal class ExecuteScriptCommand : IScriptCommand
1111 {
1212 private readonly string _script ;
13+ private readonly string [ ] _scriptArgs ;
1314 private readonly IFileSystem _fileSystem ;
1415 private readonly IScriptExecutor _scriptExecutor ;
1516 private readonly IScriptPackResolver _scriptPackResolver ;
1617 private readonly IAssemblyName _assemblyName ;
1718
1819 private readonly ILog _logger ;
1920
20- public ExecuteScriptCommand ( string script ,
21- IFileSystem fileSystem ,
22- IScriptExecutor scriptExecutor ,
21+ public ExecuteScriptCommand ( string script ,
22+ string [ ] scriptArgs ,
23+ IFileSystem fileSystem ,
24+ IScriptExecutor scriptExecutor ,
2325 IScriptPackResolver scriptPackResolver ,
2426 ILog logger ,
2527 IAssemblyName assemblyName )
2628 {
2729 _script = script ;
30+ _scriptArgs = scriptArgs ;
2831 _fileSystem = fileSystem ;
2932 _scriptExecutor = scriptExecutor ;
3033 _scriptPackResolver = scriptPackResolver ;
@@ -44,7 +47,7 @@ public CommandResult Execute()
4447 assemblyPaths = GetAssemblyPaths ( workingDirectory ) ;
4548 }
4649
47- _scriptExecutor . Execute ( _script , assemblyPaths , _scriptPackResolver . GetPacks ( ) ) ;
50+ _scriptExecutor . Execute ( _script , _scriptArgs , assemblyPaths , _scriptPackResolver . GetPacks ( ) ) ;
4851 return CommandResult . Success ;
4952 }
5053 catch ( Exception ex )
0 commit comments