MCPcopy Create free account
hub / github.com/github/copilot-sdk / versionedBinaryPath

Function versionedBinaryPath

go/internal/embeddedcli/embeddedcli.go:162–169  ·  view source on GitHub ↗

versionedBinaryPath builds the unpacked binary filename with an optional version suffix.

(dir, binaryName, version string)

Source from the content-addressed store, hash-verified

160
161// versionedBinaryPath builds the unpacked binary filename with an optional version suffix.
162func versionedBinaryPath(dir, binaryName, version string) string {
163 if version == "" {
164 return filepath.Join(dir, binaryName)
165 }
166 base := strings.TrimSuffix(binaryName, filepath.Ext(binaryName))
167 ext := filepath.Ext(binaryName)
168 return filepath.Join(dir, fmt.Sprintf("%s_%s%s", base, version, ext))
169}
170
171// sanitizeVersion makes a version string safe for filenames.
172func sanitizeVersion(version string) string {

Callers 4

TestVersionedBinaryPathFunction · 0.85
installAtFunction · 0.85

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…