Изменение работы прав с файлами и каталогами

This commit is contained in:
2025-10-26 15:20:19 +03:00
parent e5400379fe
commit 346535ac9a
5 changed files with 99 additions and 43 deletions

View File

@@ -9,6 +9,8 @@ import (
"text/template"
"gitea.plemya-x.ru/Plemya-x/ALR-updater/internal/config"
"gitea.plemya-x.ru/Plemya-x/ALR-updater/internal/permissions"
"go.elara.ws/logger/log"
)
// PluginTemplate представляет шаблон плагина
@@ -383,6 +385,11 @@ func (pg *PluginGenerator) GeneratePlugin(detected DetectedPackage, repoName str
return fmt.Errorf("failed to execute template: %w", err)
}
// Восстанавливаем права на файл плагина
if err := permissions.FixFilePermissions(pluginFile); err != nil {
log.Warn("Failed to fix plugin file permissions").Str("path", pluginFile).Err(err).Send()
}
fmt.Printf("✅ Generated plugin: %s\n", pluginFile)
return nil
}