MCPcopy
hub / github.com/cli/cli / extractScriptName

Function extractScriptName

acceptance/acceptance_test.go:453–461  ·  view source on GitHub ↗
(vars []string)

Source from the content-addressed store, hash-verified

451}
452
453func extractScriptName(vars []string) (string, bool) {
454 for _, kv := range vars {
455 if strings.HasPrefix(kv, "WORK=") {
456 v := strings.Split(kv, "=")[1]
457 return strings.CutPrefix(path.Base(v), "script-")
458 }
459 }
460 return "", false
461}
462
463type missingEnvError struct {
464 missingEnvs []string

Callers 1

sharedSetupFunction · 0.85

Calls 1

BaseMethod · 0.80

Tested by

no test coverage detected