func readVersion()

in internal/system/system.go [91:105]


func readVersion() (*VersionInfo, error) {
	// Read the version info from the standard file path
	version, err := readProductVersionFile(versionPath)
	if err != nil {
		return nil, err
	}

	// If the returned product version is in compat mode, read the
	// version info from the dot file to bypass compat mode.
	if version.ProductVersion == dotVersionSwitch {
		return readProductVersionFile(dotVersionPath)
	}

	return version, nil
}