mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-04 03:18:21 +08:00
fix(update): .agents项目自维护文件改判可选更新,防止升级强制覆盖与强制删除
This commit is contained in:
@@ -664,6 +664,14 @@ class AdminUpdateServiceBase
|
||||
|
||||
protected function testIsOptionalFiles($file_path)
|
||||
{
|
||||
// .agents 下项目自维护的文件:可选更新,防止被强制覆盖/强制删除
|
||||
if ($file_path === '.agents/PROJECT.md') {
|
||||
return true;
|
||||
}
|
||||
if (str_starts_with($file_path, '.agents/rules/project-')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 如果file_path以app或config开头,则是可选更新的文件
|
||||
$optional_files_prefix = [
|
||||
'app',
|
||||
|
||||
Reference in New Issue
Block a user