Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5e8af8f authored by Manu Suresh's avatar Manu Suresh Committed by Jackeagle
Browse files

web-installer: npm run format

parent a7acdb5b
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -45,13 +45,19 @@ export class Bootloader extends Device {

    for (let attempt = 1; attempt <= MAX_CONNECT_ATTEMPTS; attempt++) {
      try {
        WDebug.log(`Connecting to bootloader (attempt ${attempt}/${MAX_CONNECT_ATTEMPTS})...`);
        WDebug.log(
          `Connecting to bootloader (attempt ${attempt}/${MAX_CONNECT_ATTEMPTS})...`,
        );
        await this.device.connect();
        WDebug.log(`Successfully connected to bootloader on attempt ${attempt}`);
        WDebug.log(
          `Successfully connected to bootloader on attempt ${attempt}`,
        );
        return;
      } catch (e) {
        const errorMsg = e.message || String(e);
        WDebug.log(`Bootloader connection attempt ${attempt} failed: ${errorMsg}`);
        WDebug.log(
          `Bootloader connection attempt ${attempt} failed: ${errorMsg}`,
        );

        // If this is the last attempt, throw the error
        if (attempt === MAX_CONNECT_ATTEMPTS) {
@@ -59,7 +65,7 @@ export class Bootloader extends Device {
            `Cannot connect to bootloader after ${MAX_CONNECT_ATTEMPTS} attempts. ` +
              `The device may not be in bootloader mode yet. ` +
              `Please ensure the device is in bootloader/fastboot mode and try again. ` +
            `Error: ${errorMsg}`
              `Error: ${errorMsg}`,
          );
        }