mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
sysutils/git-backup - reference defined git. (https://github.com/opnsense/plugins/issues/2994)
This commit is contained in:
@@ -159,10 +159,10 @@ class Git extends Base implements IBackupProvider
|
||||
} else {
|
||||
$url = substr($url, 0, $pos + 2) . urlencode((string)$mdl->user) . "@" . substr($url, $pos + 2);
|
||||
}
|
||||
exec("cd {$targetdir} && git remote remove origin");
|
||||
exec("cd {$targetdir} && git remote add origin " . escapeshellarg($url));
|
||||
exec("cd {$targetdir} && {$git} remote remove origin");
|
||||
exec("cd {$targetdir} && {$git} remote add origin " . escapeshellarg($url));
|
||||
$pushtxt = shell_exec(
|
||||
"(cd {$targetdir} && git push origin " . escapeshellarg("master:{$mdl->branch}") .
|
||||
"(cd {$targetdir} && {$git} push origin " . escapeshellarg("master:{$mdl->branch}") .
|
||||
" && echo '__exit_ok__') 2>&1"
|
||||
);
|
||||
if (strpos($pushtxt, '__exit_ok__')) {
|
||||
|
||||
Reference in New Issue
Block a user