MCPcopy Create free account
hub / github.com/Facets-cloud/flow / tempScriptPath

Function tempScriptPath

internal/warp/warp.go:225–232  ·  view source on GitHub ↗

tempScriptPath returns os.TempDir()/flow-warp- .sh. UUID is 16 crypto/rand bytes hex-encoded — sufficient uniqueness for concurrent spawns. No dependency on internal/app's UUID helper because backend packages shouldn't import app.

()

Source from the content-addressed store, hash-verified

223// spawns. No dependency on internal/app's UUID helper because backend
224// packages shouldn't import app.
225func tempScriptPath() (string, error) {
226 var buf [16]byte
227 if _, err := rand.Read(buf[:]); err != nil {
228 return "", fmt.Errorf("generate warp script id: %w", err)
229 }
230 name := fmt.Sprintf("flow-warp-%s.sh", hex.EncodeToString(buf[:]))
231 return filepath.Join(os.TempDir(), name), nil
232}
233
234// isAccessibilityDenied reports whether an osascript failure looks
235// like a missing-Accessibility-permission error. Matches the same

Callers 1

warp.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected