aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index df8b5c0..4c1e24b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -281,6 +281,7 @@ fn run() -> Result<ExitCode> {
"migrate" => {
let migration = enstate::migrate::migrate(
&schema,
+ &schema_bytes,
&store,
matches.get_flag("dry-run"),
&systemctl,
@@ -564,6 +565,17 @@ fn print_migration(migration: &enstate::migrate::Migration) -> Result<()> {
for reason in &migration.refused {
writeln!(out, " {} {reason}", style.paint("31", "refused:"))?;
}
+ for incoming in &migration.incoming {
+ let what = match (&incoming.plan, migration.dry_run) {
+ (Some(plan), true) if plan.accepted => "would go in".to_owned(),
+ (Some(plan), false) if plan.accepted => match &plan.snapshot {
+ Some(id) => format!("went in: snapshot {id}"),
+ None => "went in, changing nothing".to_owned(),
+ },
+ _ => style.paint("31", "refused"),
+ };
+ writeln!(out, "incoming {}: {what}", incoming.name)?;
+ }
for (channel, channel_migration) in &migration.channels {
writeln!(
out,