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

Function extractScriptName

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

Source from the content-addressed store, hash-verified

1267}
1268
1269func extractScriptName(vars []string) (string, bool) {
1270 for _, kv := range vars {
1271 if strings.HasPrefix(kv, "WORK=") {
1272 v := strings.Split(kv, "=")[1]
1273 return strings.CutPrefix(filepath.Base(v), "script-")
1274 }
1275 }
1276 return "", false
1277}
1278
1279type missingEnvError struct {
1280 missingEnvs []string

Callers 1

sharedSetupFunction · 0.85

Calls 1

BaseMethod · 0.80

Tested by

no test coverage detected