diff --git a/src/cli/subcommand/plan.rs b/src/cli/subcommand/plan.rs index 923261094..a97fcdf54 100644 --- a/src/cli/subcommand/plan.rs +++ b/src/cli/subcommand/plan.rs @@ -1,6 +1,6 @@ use std::{path::PathBuf, process::ExitCode}; -use crate::{error::HasExpectedErrors, BuiltinPlanner}; +use crate::{cli::ensure_root, error::HasExpectedErrors, BuiltinPlanner}; use clap::Parser; use eyre::WrapErr; @@ -32,6 +32,8 @@ impl CommandExecute for Plan { async fn execute(self) -> eyre::Result { let Self { planner, output } = self; + ensure_root()?; + let planner = match planner { Some(planner) => planner, None => BuiltinPlanner::default().await?,