(_ context.Context, rc requestContext)
| 9 | ) |
| 10 | |
| 11 | func 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 | |
| 22 | func maybeQuote(s string) string { |
| 23 | if !strings.Contains(s, " ") { |
nothing calls this directly
no test coverage detected
searching dependent graphs…