Added crash for prune in workspace mode

main
Michal 2 years ago
parent ee675a703f
commit 4ff5f32222

@ -57,13 +57,21 @@ fn main() {
if !repository { if !repository {
crash!( crash!(
AppExitCode::BuildInWorkspace, AppExitCode::BuildInWorkspace,
"Cannot build packages in workspace mode" "Cannot generate repository in workspace mode"
); );
} }
repository::generate(verbose); repository::generate(verbose);
} }
Operation::Config => operations::config(verbose), Operation::Config => operations::config(verbose),
Operation::Prune => operations::prune(verbose), Operation::Prune => {
if !repository {
crash!(
AppExitCode::BuildInWorkspace,
"Cannot prune packages in workspace mode"
);
}
operations::prune(verbose)
},
Operation::Clean => operations::clean(verbose), Operation::Clean => operations::clean(verbose),
Operation::Info => operations::info(verbose), Operation::Info => operations::info(verbose),
} }

Loading…
Cancel
Save