MCPcopy Create free account
hub / github.com/compozy/agh / ensureEditableConfigFile

Function ensureEditableConfigFile

internal/cli/config.go:1817–1823  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

1815}
1816
1817func ensureEditableConfigFile(path string) error {
1818 file, err := os.OpenFile(path, os.O_CREATE|os.O_RDWR, 0o600)
1819 if err != nil {
1820 return fmt.Errorf("cli: create editable config file %q: %w", path, err)
1821 }
1822 return file.Close()
1823}
1824
1825func runConfigEditor(cmd *cobra.Command, deps commandDeps, path string) error {
1826 editor := strings.TrimSpace(deps.getenv("VISUAL"))

Callers 1

newConfigEditCommandFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected