Изменение работы прав с файлами и каталогами
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user