--Sherlock, Ric wrote: 
> Acutally is there a reason to use shell to spawn cmd which 
> then runs the utility rather than spawning the utility 
> directly?  If not then it would not be necessary to double 
> quote the command and line 345 would become just
>     spawn y

To answer my own question ... one reason is because of the use of a
batch file in unzip. So here is an updated, consolidated set of
suggested revisions to pacman.ijs

LINE 37 (definition of HTTPCMD & UNZIP)
  HTTPCMD=: jpath '~install/tools/ftp/wget.exe -O %O -o %L -t %T %U'
becomes
  HTTPCMD=: '"',(jpath '~install/tools/ftp/wget.exe'),'" -O %O -o %L -t
%T %U'

LINE 345 (definition of shellcmd)
  shell y
Becomes
  spawn y

The unzip verb (starting LINE 368) is simplified to the following:
unzip=: 3 : 0
'file dir'=. dquote each y
e=. 'Unexpected error'
if. IFUNIX do.
  e=. shellcmd 'tar -xzf ',file,' -C ',dir
else.
  e=. shellcmd UNZIP,' ',file,' -d ',dir
end.
e
)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to