MCPcopy
hub / github.com/cli/cli / shellInspect

Function shellInspect

script/build.go:231–241  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

229}
230
231func shellInspect(args []string) string {
232 fmtArgs := make([]string, len(args))
233 for i, arg := range args {
234 if strings.ContainsAny(arg, " \t'\"") {
235 fmtArgs[i] = fmt.Sprintf("%q", arg)
236 } else {
237 fmtArgs[i] = arg
238 }
239 }
240 return strings.Join(fmtArgs, " ")
241}
242
243func normalizeTask(t string) string {
244 return filepath.ToSlash(strings.TrimSuffix(t, ".exe"))

Callers 1

announceFunction · 0.85

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected