resolveClientOutputPath resolves the output path for CLI client commands.
(outputDir string)
| 144 | |
| 145 | // resolveClientOutputPath resolves the output path for CLI client commands. |
| 146 | func 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 | |
| 162 | func resolveAPIConnection(requireServer bool) (string, string, error) { |
| 163 | target := resolveHostTarget() |