@@ -64,24 +64,24 @@ public override async Task Invoke(object[] parameters)
64
64
switch ( _scriptType )
65
65
{
66
66
case "ps1" :
67
- scriptHostArguments = string . Format ( "-ExecutionPolicy RemoteSigned -File {0}" , _scriptFilePath ) ;
67
+ scriptHostArguments = string . Format ( "-ExecutionPolicy RemoteSigned -File \" {0}\" " , _scriptFilePath ) ;
68
68
await ExecuteScriptAsync ( "PowerShell.exe" , scriptHostArguments , parameters ) ;
69
69
break ;
70
70
case "cmd" :
71
71
case "bat" :
72
- scriptHostArguments = string . Format ( "/c {0}" , _scriptFilePath ) ;
72
+ scriptHostArguments = string . Format ( "/c \" {0}\" " , _scriptFilePath ) ;
73
73
await ExecuteScriptAsync ( "cmd" , scriptHostArguments , parameters ) ;
74
74
break ;
75
75
case "py" :
76
- scriptHostArguments = string . Format ( "{0}" , _scriptFilePath ) ;
76
+ scriptHostArguments = string . Format ( "\" {0}\" " , _scriptFilePath ) ;
77
77
await ExecuteScriptAsync ( "python.exe" , scriptHostArguments , parameters ) ;
78
78
break ;
79
79
case "php" :
80
- scriptHostArguments = string . Format ( "{0}" , _scriptFilePath ) ;
80
+ scriptHostArguments = string . Format ( "\" {0}\" " , _scriptFilePath ) ;
81
81
await ExecuteScriptAsync ( "php.exe" , scriptHostArguments , parameters ) ;
82
82
break ;
83
83
case "sh" :
84
- scriptHostArguments = string . Format ( "{0}" , _scriptFilePath ) ;
84
+ scriptHostArguments = string . Format ( "\" {0}\" " , _scriptFilePath ) ;
85
85
string bashPath = ResolveBashPath ( ) ;
86
86
await ExecuteScriptAsync ( bashPath , scriptHostArguments , parameters ) ;
87
87
break ;
0 commit comments