fishctl/src/command/config/migrate.rs

20 lines
400 B
Rust
Raw Normal View History

2024-06-20 08:17:13 +09:00
//! `config migrate` subcommand
2024-06-20 02:42:33 +09:00
mod v20240701;
2024-06-20 02:07:34 +09:00
2024-06-21 03:30:05 +09:00
use super::ConfigRevision;
2024-06-20 02:07:34 +09:00
#[derive(thiserror::Error, Debug)]
2024-06-21 03:13:58 +09:00
pub(crate) enum MigrationError {
2024-06-20 03:19:20 +09:00
#[error(transparent)]
V20240701(#[from] v20240701::Error),
2024-06-20 02:07:34 +09:00
}
2024-06-21 03:31:13 +09:00
pub(super) async fn run(revision: ConfigRevision) -> Result<(), MigrationError> {
match revision {
2024-06-21 03:30:05 +09:00
ConfigRevision::V20240701 => v20240701::run().await?,
2024-06-20 02:07:34 +09:00
}
Ok(())
}