mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-31 13:03:02 +02:00
dagger: Keep abandoned generations around for debugging
When evolving to a new generation fails, users will typically abandon it (so that a new attempt can be made). However, the generated scripts and the logged output is very valuable from a debugging perspective. Therefore, keep the data around by just renaming the generation directory. Later, we can include these directories in the garbage collecting process, if we want to.
This commit is contained in:
@@ -78,7 +78,8 @@ do_abandon()
|
||||
[ "$next" ] && [ -d "$basedir/$next" ] \
|
||||
|| abort "Next generation does not exist"
|
||||
|
||||
rm -rf "$basedir/$next" "$basedir/next"
|
||||
mv "$basedir/$next" "$basedir/$next-ABANDONED-$(date +%F-%T)"
|
||||
rm "$basedir/next"
|
||||
inform info "Abandoned generation $next"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user