mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 03:20:26 +00:00
Add package validation guard and make pacman idempotent
- Add explicit validation in UpdatePackage to require package name when 'all' is false, preventing empty package commands being sent to servers - Add --needed flag to pacman install in InstallDocker for idempotent Docker installation on Arch Linux 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -158,7 +158,8 @@ class InstallDocker
|
||||
// Use -Syu to perform full system upgrade before installing Docker
|
||||
// Partial upgrades (-Sy without -u) are discouraged on Arch Linux
|
||||
// as they can lead to broken dependencies and system instability
|
||||
return 'pacman -Syu --noconfirm docker docker-compose && '.
|
||||
// Use --needed to skip reinstalling packages that are already up-to-date (idempotent)
|
||||
return 'pacman -Syu --noconfirm --needed docker docker-compose && '.
|
||||
'systemctl enable docker.service && '.
|
||||
'systemctl start docker.service';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user