Repository: puppeteer/puppeteer
File: packages/puppeteer/src/node/install.ts (TypeScript)

Code before:
          baseUrl: downloadBaseUrl,
        })
          .then(result => {
            logPolitely(
              `${supportedProducts[product]} (${result.buildId}) downloaded to ${result.path}`
            );
          })
          .catch(error => {
            throw new Error(
              `ERROR: Failed to set up ${supportedProducts[product]} v${buildId}! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.`,
              {
                cause: error,
              }
            );
          })
      );
    }

    if (browser === Browser.CHROME) {
      if (configuration.skipChromeHeadlessShellDownload) {
        logPolitely('**INFO** Skipping Chrome download as instructed.');
      } else {
        const shellBuildId =
          browser === Browser.CHROME
            ? await resolveBuildId(browser, platform, unresolvedShellBuildId)
            : '';

        installationJobs.push(
          install({
            browser: Browser.CHROMEHEADLESSSHELL,
            cacheDir,
            platform,
            buildId: shellBuildId,
            downloadProgressCallback: makeProgressCallback(
              browser,
              shellBuildId
            ),
            baseUrl: downloadBaseUrl,
          })
            .then(result => {
              logPolitely(
                `${Browser.CHROMEHEADLESSSHELL} (${result.buildId}) downloaded to ${result.path}`
              );
            })
            .catch(error => {
              throw new Error(
                `ERROR: Failed to set up ${Browser.CHROMEHEADLESSSHELL} v${shellBuildId}! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.`,
                {
                  cause: error,
                }
              );

Review comment (suggestion):
We check for this a few line prior.
```suggestion
        const shellBuildId = await resolveBuildId(browser, platform, unresolvedShellBuildId);
```

Code after:
          baseUrl: downloadBaseUrl,
        })
          .then(result => {
            logPolitely(
              `${supportedProducts[product]} (${result.buildId}) downloaded to ${result.path}`
            );
          })
          .catch(error => {
            throw new Error(
              `ERROR: Failed to set up ${supportedProducts[product]} v${buildId}! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.`,
              {
                cause: error,
              }
            );
          })
      );
    }

    if (browser === Browser.CHROME) {
      if (configuration.skipChromeHeadlessShellDownload) {
        logPolitely('**INFO** Skipping Chrome download as instructed.');
      } else {
        const shellBuildId = await resolveBuildId(
          browser,
          platform,
          unresolvedShellBuildId
        );

        installationJobs.push(
          install({
            browser: Browser.CHROMEHEADLESSSHELL,
            cacheDir,
            platform,
            buildId: shellBuildId,
            downloadProgressCallback: makeProgressCallback(
              browser,
              shellBuildId
            ),
            baseUrl: downloadBaseUrl,
          })
            .then(result => {
              logPolitely(
                `${Browser.CHROMEHEADLESSSHELL} (${result.buildId}) downloaded to ${result.path}`
              );
            })
            .catch(error => {
              throw new Error(
                `ERROR: Failed to set up ${Browser.CHROMEHEADLESSSHELL} v${shellBuildId}! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.`,
                {
                  cause: error,
                }