Skip to content

Commit fab73cc

Browse files
committed
Fixed PR notes
1 parent f9a6c47 commit fab73cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/cli/src/subcommands/publish.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> Result<(), anyhow::E
175175
let domain = percent_encoding::percent_encode(name_or_identity.as_bytes(), encode_set);
176176
let mut builder = client.put(format!("{database_host}/v1/database/{domain}"));
177177

178-
if !(matches!(clear_database, ClearMode::Always)) {
178+
if !(clear_database == ClearMode::Always) {
179179
builder = apply_pre_publish_if_needed(
180180
builder,
181181
&client,
@@ -196,7 +196,7 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> Result<(), anyhow::E
196196
client.post(format!("{database_host}/v1/database"))
197197
};
198198

199-
if matches!(clear_database, ClearMode::Always) || matches!(clear_database, ClearMode::OnConflict) {
199+
if clear_database == ClearMode::Always || clear_database == ClearMode::OnConflict {
200200
// Note: `name_or_identity` should be set, because it is `required` in the CLI arg config.
201201
println!(
202202
"This will DESTROY the current {} module, and ALL corresponding data.",
@@ -361,7 +361,7 @@ async fn apply_pre_publish_if_needed(
361361
if matches!(clear_database, ClearMode::Never) {
362362
println!("{}", manual.reason);
363363
println!("Aborting publish due to required manual migration.");
364-
anyhow::bail!("Publishing aborted by user");
364+
anyhow::bail!("Aborting because publishing would require manual migration or deletion of data and --delete-data was not specified.");
365365
}
366366
}
367367
PrePublishResult::AutoMigrate(auto) => {

0 commit comments

Comments
 (0)