Fix permission errors in version cleanup find command
This commit is contained in:
parent
ecaca99b8f
commit
0fd15e7b91
1 changed files with 1 additions and 1 deletions
|
|
@ -439,7 +439,7 @@ process_stack() {
|
|||
# Clean up old versions and backups
|
||||
if [ "$DRY_RUN" != "true" ]; then
|
||||
log "Cleaning up old versions (keeping $keep_versions)"
|
||||
find "$path" -name "compose-*.yml.bak" -type f | sort -r | tail -n +$((keep_versions + 1)) | xargs -r rm
|
||||
find "$path" -name "compose-*.yml.bak" -type f 2>/dev/null | sort -r | tail -n +$((keep_versions + 1)) | xargs -r rm
|
||||
cleanup_old_backups "$path" "$keep_versions"
|
||||
else
|
||||
log "Would clean up old versions (keeping $keep_versions)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue