File tree Expand file tree Collapse file tree
autoload/vital/__vital__/System Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,17 +83,6 @@ function! s:execute(command, options) abort
8383 throw ' vital: AsyncProcess: invalid argument (value type:' . type (a: command ) . ' )'
8484 endif
8585
86- " build args
87- let args = []
88- if stridx (&shell , ' cmd.exe' ) != -1
89- " cmd.exe
90- let args = args + [' /c' ]
91- else
92- " sh, bash, pwsh, etc.
93- let args = args + [' -c' ]
94- endif
95- let args = args + [command ]
96-
9786 let job_id = -1
9887 if s: is_nvim
9988 let options = {}
@@ -107,7 +96,7 @@ function! s:execute(command, options) abort
10796 let options [' on_exit' ] = function (' s:_inner_exit_cb' , [a: options .exit_cb])
10897 endif
10998
110- let job_id = jobstart ([& shell ] + args , options )
99+ let job_id = jobstart (command , options )
111100
112101 if has_key (a: options , ' timeout' )
113102 if a: options .timeout > 0
@@ -130,7 +119,7 @@ function! s:execute(command, options) abort
130119 let options [' exit_cb' ] = function (' s:_inner_exit_cb' , [a: options .exit_cb])
131120 endif
132121
133- let job = job_start ([& shell ] + args , options )
122+ let job = job_start (command , options )
134123
135124 if has_key (a: options , ' timeout' )
136125 if a: options .timeout > 0
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Describe System.AsyncProcess
4747 let g:exit_code = a:exit_code
4848 endfunction
4949
50- let args = 'echo "abcdefg"'
50+ let args = 'cmd.exe /c echo "abcdefg"'
5151 call AsyncProcess.execute(args, {
5252 \ 'exit_cb': function('s:my_exit_cb'),
5353 \ 'out_cb': function('s:my_out_cb'),
@@ -60,7 +60,7 @@ Describe System.AsyncProcess
6060 Assert Equals(g:err_msg, "")
6161
6262 if s:is_windows
63- let actual_out_msg = '\ "abcdefg\ "'
63+ let actual_out_msg = '"abcdefg"'
6464 else
6565 let actual_out_msg = "abcdefg"
6666 endif
You can’t perform that action at this time.
0 commit comments