MCPcopy Create free account
hub / github.com/driangle/taskmd / openInEditor

Function openInEditor

apps/cli/internal/cli/add.go:367–377  ·  view source on GitHub ↗
(filePath string)

Source from the content-addressed store, hash-verified

365}
366
367func openInEditor(filePath string) error {
368 editor := os.Getenv("EDITOR")
369 if editor == "" {
370 return fmt.Errorf("$EDITOR is not set; cannot open file for editing")
371 }
372 cmd := exec.Command(editor, filePath)
373 cmd.Stdin = os.Stdin
374 cmd.Stdout = os.Stdout
375 cmd.Stderr = os.Stderr
376 return cmd.Run()
377}

Callers 1

runAddFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected