@@ -162,7 +162,7 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> Result<(), anyhow::E
162162
163163 let mut builder = client. put ( format ! ( "{database_host}/v1/database/{domain}" ) ) ;
164164
165- if !( matches ! ( clear_database, ClearMode :: Always ) ) {
165+ if !( clear_database == ClearMode :: Always ) {
166166 builder = apply_pre_publish_if_needed (
167167 builder,
168168 & client,
@@ -183,7 +183,7 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> Result<(), anyhow::E
183183 client. post ( format ! ( "{database_host}/v1/database" ) )
184184 } ;
185185
186- if matches ! ( clear_database, ClearMode :: Always ) || matches ! ( clear_database, ClearMode :: OnConflict ) {
186+ if clear_database == ClearMode :: Always || clear_database == ClearMode :: OnConflict {
187187 // Note: `name_or_identity` should be set, because it is `required` in the CLI arg config.
188188 println ! (
189189 "This will DESTROY the current {} module, and ALL corresponding data." ,
@@ -316,7 +316,7 @@ async fn apply_pre_publish_if_needed(
316316 if matches ! ( clear_database, ClearMode :: Never ) {
317317 println ! ( "{}" , manual. reason) ;
318318 println ! ( "Aborting publish due to required manual migration." ) ;
319- anyhow:: bail!( "Publishing aborted by user " ) ;
319+ anyhow:: bail!( "Aborting because publishing would require manual migration or deletion of data and --delete-data was not specified. " ) ;
320320 }
321321 }
322322 PrePublishResult :: AutoMigrate ( auto) => {
0 commit comments