MCPcopy Create free account
hub / github.com/github/gh-aw / installedExtensionVersion

Function installedExtensionVersion

pkg/cli/update_extension_check.go:505–518  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

503}
504
505func installedExtensionVersion() (string, error) {
506 var out bytes.Buffer
507 cmd := ghCmdForExtension("aw", "version")
508 cmd.Stdout = &out
509 cmd.Stderr = &out
510 if err := cmd.Run(); err != nil {
511 return "", fmt.Errorf("failed to query installed gh-aw version: %w (output: %s)", err, summarizeCommandOutput(out.String()))
512 }
513 version, err := parseInstalledVersionOutput(out.String())
514 if err != nil {
515 return "", err
516 }
517 return version, nil
518}
519
520func verifyInstalledVersion(targetVersion string) (string, error) {
521 installedVersion, err := installedExtensionVersion()

Callers 2

verifyInstalledVersionFunction · 0.85

Calls 6

ghCmdForExtensionFunction · 0.85
summarizeCommandOutputFunction · 0.85
RunMethod · 0.45
ErrorfMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected