private async getInstallConfig()

in src/server/install.ts [229:272]


  private async getInstallConfig(): Promise<InstallConfig | null> {
    const settingError = (setting: SettingName) => {
      this.outputChannel.appendLine(
        `Install interrupted. Please check the ${setting} setting to ensure a valid value.`
      )
    }
    const projectFilePath = getExtensionSetting(
      SettingName.BAZEL_PROJECT_FILE_PATH
    )
    if (projectFilePath === undefined) {
      settingModifyPrompt(
        'Unable to determine the Bazel project file path from settings.',
        SettingName.BAZEL_PROJECT_FILE_PATH
      )
      settingError(SettingName.BAZEL_PROJECT_FILE_PATH)
      return null
    }

    const bazelBspVersion = getExtensionSetting(SettingName.BSP_SERVER_VERSION)
    if (bazelBspVersion === undefined) {
      settingModifyPrompt(
        'Unable to determine the Bazel BSP version from settings.',
        SettingName.BSP_SERVER_VERSION
      )
      settingError(SettingName.BSP_SERVER_VERSION)
      return null
    }

    const bazelBinaryPath = getExtensionSetting(SettingName.BAZEL_BINARY_PATH)
    if (bazelBinaryPath === undefined) {
      settingModifyPrompt(
        'Unable to determine the Bazel BSP binary path from settings.',
        SettingName.BAZEL_BINARY_PATH
      )
      settingError(SettingName.BAZEL_BINARY_PATH)
      return null
    }

    return {
      bazelProjectFilePath: projectFilePath,
      serverVersion: bazelBspVersion,
      bazelBinaryPath: bazelBinaryPath,
    }
  }