MCPcopy Create free account
hub / github.com/cli/cli / shellInspect

Function shellInspect

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

Source from the content-addressed store, hash-verified

255}
256
257func shellInspect(args []string) string {
258 fmtArgs := make([]string, len(args))
259 for i, arg := range args {
260 if strings.ContainsAny(arg, " \t'\"") {
261 fmtArgs[i] = fmt.Sprintf("%q", arg)
262 } else {
263 fmtArgs[i] = arg
264 }
265 }
266 return strings.Join(fmtArgs, " ")
267}
268
269func normalizeTask(t string) string {
270 return filepath.ToSlash(strings.TrimSuffix(t, ".exe"))

Callers 1

announceFunction · 0.85

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected