[fpc-devel] TProcess empty parameter

Marco van de Voort marcov at stack.nl
Thu May 7 12:29:32 CEST 2015


In our previous episode, Michael Van Canneyt said:

> > Cmd:='checkout --username "ausername" --password "" -r HEAD remoterepo 
> > localrepo';
> > ExecuteCommand(Exe+' '+Cmd,....);
> >
> > As the command itself is a single string, I do not understand why all 
> > parameters are split and then combined again. In all conversions, the empty 
> > password string is lost when using ExecuteCommand from the processutils unit.
> 
> I don't know what code you are looking at but the unix version of TProcess uses ExecVE.

(processutils is an unit from Ludo used and extended by Reinier for fpcup,
which he later extended with Runcommand variants because he still wanted to
support 2.6.0.

Some of the prototypes (though not the current code) was what spawned the
runcommand functions.

So basically they are helpers that are tied to fpcup because of its
one single commandline internal limitations (still?) and 2.6.0 legacy
support.

Both are reasons to not use the unit in new codebases (though maybe we
should adapt some of the environment support)

https://bitbucket.org/reiniero/fpcup/src/b2d024f1a6d2c378585c8114866f6fa3a82fa3f3/processutils.pas?at=default
)



More information about the fpc-devel mailing list