Checks if exec is available in the migration

This commit is contained in:
Andreas Kristiansen
2024-07-30 20:54:03 +02:00
parent 40030dd346
commit 3c76e3c4dc

View File

@@ -8,17 +8,17 @@ class Migration_process_deprecated extends CI_Migration
if (file_exists('.git')) {
try {
exec('git reset assets/json/dok.txt');
if (function_exists('exec')) {
exec('git reset assets/json/dok.txt');
exec('git reset assets/json/pota.txt');
exec('git reset assets/resources/sota.txt');
exec('git reset assets/resources/wwff.txt');
exec('rm assets/json/dok.txt');
exec('rm assets/json/pota.txt');
exec('git restore assets/resources/sota.txt');
exec('git restore assets/resources/wwff.txt');
exec('git reset assets/resources/sota.txt');
exec('git reset assets/resources/wwff.txt');
exec('rm assets/json/dok.txt');
exec('rm assets/json/pota.txt');
exec('git restore assets/resources/sota.txt');
exec('git restore assets/resources/wwff.txt');
}
} catch (\Throwable $th) {
$branch = trim(exec('git rev-parse --abbrev-ref HEAD'));