MCPcopy Create free account
hub / github.com/kopia/kopia / handleCLIInfo

Function handleCLIInfo

internal/server/api_cli.go:11–20  ·  view source on GitHub ↗
(_ context.Context, rc requestContext)

Source from the content-addressed store, hash-verified

9)
10
11func handleCLIInfo(_ context.Context, rc requestContext) (any, *apiError) {
12 executable, err := os.Executable()
13 if err != nil {
14 executable = "kopia"
15 }
16
17 return &serverapi.CLIInfo{
18 Executable: maybeQuote(executable) + " --config-file=" + maybeQuote(rc.srv.getOptions().ConfigFile) + "",
19 }, nil
20}
21
22func maybeQuote(s string) string {
23 if !strings.Contains(s, " ") {

Callers

nothing calls this directly

Calls 2

maybeQuoteFunction · 0.85
getOptionsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…