mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 17:26:31 +02:00
Show error message if Grav is symlinked, and stop the upgrade process
This commit is contained in:
@@ -695,6 +695,11 @@ class AdminController
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_link(ROOT_DIR . 'index.php')) {
|
||||
$this->admin->json_response = ['status' => 'error', 'message' => 'Cannot upgrade: Grav is symlinked. Please upgrade manually'];
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = \Grav\Plugin\Admin\Gpm::selfupgrade();
|
||||
|
||||
if ($result) {
|
||||
|
||||
@@ -173,7 +173,7 @@ class Gpm
|
||||
$file = self::_downloadSelfupgrade($update, $tmp);
|
||||
|
||||
Installer::install($file, GRAV_ROOT,
|
||||
['sophisticated' => true, 'overwrite' => true, 'ignore_symlinks' => false]);
|
||||
['sophisticated' => true, 'overwrite' => true, 'ignore_symlinks' => true]);
|
||||
|
||||
$errorCode = Installer::lastErrorCode();
|
||||
|
||||
@@ -185,4 +185,4 @@ class Gpm
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user