mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-02 19:59:03 +00:00
fix(cli): remove dup. message if already enhanced
This commit is contained in:
parent
9b03b1d9f7
commit
3d7efbef54
27
bin.mjs
27
bin.mjs
@ -252,21 +252,18 @@ try {
|
||||
}
|
||||
},
|
||||
compareVersions = async () => {
|
||||
if (insertVersion === manifest.version) {
|
||||
// same version already applied
|
||||
print` {grey * ${messages["notion-found"]}}\n`;
|
||||
return SUCCESS;
|
||||
} else if (insertVersion) {
|
||||
// diff version already applied
|
||||
print` {grey * ${messages["notion-found"]}}\n`;
|
||||
const replace = await promptConfirmation(messages["update-confirm"]);
|
||||
print`\n`;
|
||||
return ["Y", "y"].includes(replace)
|
||||
? (await interactiveRestore()) === SUCCESS
|
||||
? INCOMPLETE
|
||||
: FAILURE
|
||||
: CANCELLED;
|
||||
} else return INCOMPLETE;
|
||||
if (!insertVersion) return INCOMPLETE;
|
||||
// same version already applied
|
||||
if (insertVersion === manifest.version) return SUCCESS;
|
||||
// diff version already applied
|
||||
print` {grey * ${messages["notion-found"]}}\n`;
|
||||
const replace = await promptConfirmation(messages["update-confirm"]);
|
||||
print`\n`;
|
||||
return ["Y", "y"].includes(replace)
|
||||
? (await interactiveRestore()) === SUCCESS
|
||||
? INCOMPLETE
|
||||
: FAILURE
|
||||
: CANCELLED;
|
||||
},
|
||||
interactiveEnhance = async () => {
|
||||
if (!args["--no-backup"]) {
|
||||
|
Loading…
Reference in New Issue
Block a user