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

Function extractScriptName

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

Source from the content-addressed store, hash-verified

539}
540
541func extractScriptName(vars []string) (string, bool) {
542 for _, kv := range vars {
543 if strings.HasPrefix(kv, "WORK=") {
544 v := strings.Split(kv, "=")[1]
545 return strings.CutPrefix(path.Base(v), "script-")
546 }
547 }
548 return "", false
549}
550
551type missingEnvError struct {
552 missingEnvs []string

Callers 1

sharedSetupFunction · 0.85

Calls 1

BaseMethod · 0.80

Tested by

no test coverage detected