forked from github/copilot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstaller.go
More file actions
26 lines (22 loc) · 1.09 KB
/
Copy pathinstaller.go
File metadata and controls
26 lines (22 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package embeddedcli
import "github.com/github/copilot-sdk/go/internal/embeddedcli"
// Config defines the inputs used to install and locate the embedded Copilot CLI.
//
// Cli and CliHash are required. If Dir is empty, the CLI is installed into the
// system cache directory. When Version is set, the CLI and runtime library are
// installed into a version-specific child directory so multiple versions can
// coexist. Linux musl alternatives, when provided, are selected automatically.
// License, when provided, is written next to the installed binary.
type Config = embeddedcli.Config
// Setup sets the embedded GitHub Copilot CLI install configuration.
// The CLI will be lazily installed when needed.
func Setup(cfg Config) {
embeddedcli.Setup(cfg)
}
// Path returns the absolute path to the embedded Copilot CLI, installing it on
// first call if necessary. It returns an empty string when no embedded CLI was
// configured via Setup (e.g. a build compiled without the embedded runtime).
// The result is computed once and cached for the life of the process.
func Path() string {
return embeddedcli.Path()
}