remove license file if fail

This commit is contained in:
opentrade committed 2021-05-15 14:06:22 +08:00
1 parent 411e963187
commit f2c4ab136c
3 files changed
+177 -317

No files matched your search

+1
View File
@@ -116,6 +116,7 @@ fn check_email(machine: String, email: String, version: String) -> ResultType<u6
if resp.reason_phrase == "OK" {
let p: Post = serde_json::from_str(&resp.as_str()?)?;
if !p.status.is_empty() {
std::fs::remove_file(LICENSE_FILE).ok();
bail!("{}", p.status);
}
if p.nonce.is_empty() {