Skip to content

Commit

Permalink
Execute templates after editing (#428)
Browse files Browse the repository at this point in the history
Execute templates after editing
  • Loading branch information
twpayne committed Sep 16, 2019
2 parents 1335bef + 850dd8c commit c4190f5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmd/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@ func (c *Config) runEditCmd(fs vfs.FS, args []string) error {
}
}

// Recompute the target state and entries after editing.
ts, err = c.getTargetState(fs, nil)
if err != nil {
return err
}

entries, err = c.getEntries(fs, ts, args)
if err != nil {
return err
}

readOnlyFS := vfs.NewReadOnlyFS(fs)
applyMutator := c.getDefaultMutator(fs)
applyOptions := chezmoi.ApplyOptions{
Expand Down

0 comments on commit c4190f5

Please sign in to comment.