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

Function extractScriptName

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

Source from the content-addressed store, hash-verified

581}
582
583func extractScriptName(vars []string) (string, bool) {
584 for _, kv := range vars {
585 if strings.HasPrefix(kv, "WORK=") {
586 v := strings.Split(kv, "=")[1]
587 return strings.CutPrefix(path.Base(v), "script-")
588 }
589 }
590 return "", false
591}
592
593type missingEnvError struct {
594 missingEnvs []string

Callers 1

sharedSetupFunction · 0.85

Calls 1

BaseMethod · 0.80

Tested by

no test coverage detected