refactor: simplify config into a single load/save with defaults resolved at load time
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ var editCmd = &cobra.Command{
|
||||
tmp.Close()
|
||||
defer os.Remove(tmp.Name())
|
||||
|
||||
c := exec.Command(cfg.GetEditor(), tmp.Name())
|
||||
c := exec.Command(cfg.Editor, tmp.Name())
|
||||
c.Stdin, c.Stdout, c.Stderr = os.Stdin, os.Stdout, os.Stderr
|
||||
if err := c.Run(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "editor failed:", err)
|
||||
|
||||
Reference in New Issue
Block a user