You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-06-14 23:44:58 +02:00
Add cmd-extra field.
Allow hidden options to be added to a command. This allows certain commands (like apt-get) to be forced during the build without making that a part of the documentation.
This commit is contained in:
@ -115,6 +115,11 @@ sub executeKey
|
||||
output => JSON::PP::false,
|
||||
};
|
||||
|
||||
if (defined($oCommand->fieldGet('exe-cmd-extra', false)))
|
||||
{
|
||||
$$hCacheKey{'cmd-extra'} = $oCommand->fieldGet('exe-cmd-extra');
|
||||
}
|
||||
|
||||
if (defined($oCommand->paramGet('err-expect', false)))
|
||||
{
|
||||
$$hCacheKey{'err-expect'} = $oCommand->paramGet('err-expect');
|
||||
@ -211,10 +216,11 @@ sub execute
|
||||
confess &log(ERROR, "cannot execute on host ${strHostName} because the host does not exist");
|
||||
}
|
||||
|
||||
my $oExec = $oHost->execute($strCommand,
|
||||
{iExpectedExitStatus => $$hCacheKey{'err-expect'},
|
||||
bSuppressError => $oCommand->paramTest('err-suppress', 'y'),
|
||||
iRetrySeconds => $oCommand->paramGet('retry', false)});
|
||||
my $oExec = $oHost->execute(
|
||||
$strCommand . (defined($$hCacheKey{'cmd-extra'}) ? ' ' . $$hCacheKey{'cmd-extra'} : ''),
|
||||
{iExpectedExitStatus => $$hCacheKey{'err-expect'},
|
||||
bSuppressError => $oCommand->paramTest('err-suppress', 'y'),
|
||||
iRetrySeconds => $oCommand->paramGet('retry', false)});
|
||||
$oExec->begin();
|
||||
$oExec->end();
|
||||
|
||||
|
Reference in New Issue
Block a user