Added crash for prune in workspace mode

main
Michal 2 years ago
parent 8850997b5d
commit 2f56563746
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -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