job_start 7za underwindows returns process 0 fail

16 views
Skip to first unread message

Ni Va

unread,
Dec 3, 2019, 5:40:17 AM12/3/19
to vim_use
Hi,

Considering this command :
cd /d D:/Softs/Vim/vim81 && D:/Softs/Vim/vim81/7za.exe a "C:/Users/foo.bar/desktop/archive Name.7z" "d:/Work/Foo/Bar/archive Path Name"


call system(command) is a success with "archiv Name.7z" present.
job_start(command) returns process 0 fail


Executables are running under windows 10
gvim 8.1.2383 in 32bits
7za.exe in 32bits version with 7za.dll associated



I have tried to put a MyHandler callback on my job_start without any result.

  fun! MyHandler(channel, msg) "{{{
  echomsg string(a:msg)
  endfunction "}}}
  let options = {
\ "callback": "MyHandler",
        \ 'timeout': 30000
        \}
  let jobid = job_start(cmd, options) | echomsg jobid



How can I fix that ?
Thank you
NiVa

Christian Brabandt

unread,
Dec 3, 2019, 5:54:35 AM12/3/19
to vim_use

On Di, 03 Dez 2019, Ni Va wrote:

> Hi,
>
> Considering this command :
> cd /d D:/Softs/Vim/vim81 && D:/Softs/Vim/vim81/7za.exe a "C:/Users/foo.bar/
> desktop/archive Name.7z" "d:/Work/Foo/Bar/archive Path Name"

this command uses &&, so it needs a shell to parse it.

> call system(command) is a success with "archiv Name.7z" present.
> job_start(command) returns process 0 fail

job_start does not use a shell so it fails.

Best,
Christian
--
Was dem Herzen widerstrebt, läßt der Kopf nicht ein.
-- Arthur Schopenhauer

Ni Va

unread,
Dec 3, 2019, 6:03:47 AM12/3/19
to vim_use
Thank you for answer.
Reply all
Reply to author
Forward
0 new messages