MCPcopy
hub / github.com/SurgeDM/Surge / resolveClientOutputPath

Function resolveClientOutputPath

cmd/utils.go:146–160  ·  view source on GitHub ↗

resolveClientOutputPath resolves the output path for CLI client commands.

(outputDir string)

Source from the content-addressed store, hash-verified

144
145// resolveClientOutputPath resolves the output path for CLI client commands.
146func resolveClientOutputPath(outputDir string) string {
147 if resolveHostTarget() != "" {
148 // Pass-through for remote connections so the daemon uses its own default/CWD.
149 return outputDir
150 }
151
152 if strings.TrimSpace(outputDir) == "" {
153 pwd, err := os.Getwd()
154 if err == nil {
155 return pwd
156 }
157 return "."
158 }
159 return utils.EnsureAbsPath(outputDir)
160}
161
162func resolveAPIConnection(requireServer bool) (string, string, error) {
163 target := resolveHostTarget()

Callers 3

add.goFile · 0.85

Calls 2

EnsureAbsPathFunction · 0.92
resolveHostTargetFunction · 0.85

Tested by 1