diff --git a/go/embeddedcli/installer.go b/go/embeddedcli/installer.go index deb4c2eef..6edddf281 100644 --- a/go/embeddedcli/installer.go +++ b/go/embeddedcli/installer.go @@ -15,3 +15,11 @@ type Config = embeddedcli.Config 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() +}