(path string)
| 1815 | } |
| 1816 | |
| 1817 | func 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 | |
| 1825 | func runConfigEditor(cmd *cobra.Command, deps commandDeps, path string) error { |
| 1826 | editor := strings.TrimSpace(deps.getenv("VISUAL")) |
no test coverage detected