mirror of
https://git.bits.team/Bits/mod-manager.git
synced 2024-11-14 10:28:21 -05:00
Made the app not hang when a mod is not found
This commit is contained in:
parent
1af3292e8c
commit
3b229070a9
@ -30,7 +30,7 @@ export default class Mods {
|
|||||||
id = await source.search(mod);
|
id = await source.search(mod);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof ModNotFoundError) {
|
if (e instanceof ModNotFoundError) {
|
||||||
spinner.updateText(`Mod not found on ${source.getSourceName()}`)
|
spinner.stop(`Mod not found on ${source.getSourceName()}`)
|
||||||
} else {
|
} else {
|
||||||
spinner.error(`An error occurred searching for ${mod} on ${source.getSourceName()}. Skipping ${source.getSourceName()}`)
|
spinner.error(`An error occurred searching for ${mod} on ${source.getSourceName()}. Skipping ${source.getSourceName()}`)
|
||||||
// Try the next source
|
// Try the next source
|
||||||
|
@ -19,8 +19,9 @@ export default class PrintUtils {
|
|||||||
this.spinner.start();
|
this.spinner.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public stop() {
|
public stop(print: string) {
|
||||||
this.spinner.stop();
|
this.updateText(print);
|
||||||
|
this.spinner.stopAndPersist();
|
||||||
}
|
}
|
||||||
|
|
||||||
public error(print: string | Error) {
|
public error(print: string | Error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user