Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
minor fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexei Yatskov committed Jan 5, 2017
1 parent 4c98383 commit 87f1a4e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -223,12 +223,12 @@ shown below:

Homemaker will process the dependency tasks before processing the task itself.

In addition to creating links, Homemaker is capable of executing commands on a per-task basis. Homemaker can commands both
before and after linking your configuration. Commands should be placed in either an array, under the field `precmds` or
`postcmds` (for commands to be run before and after linking respectively). These commands should be split into an array of
strings, with each entry corresponding to one command line argument. All of the commands are executed with `dest` as
the working directory (as mentioned previously, this defaults to your home directory). If any command returns a nonzero
exit code, Homemaker will display an error message and prompt the user to determine if it should *abort*, *retry*, or *cancel*.
In addition to creating links, Homemaker is capable of executing commands on a per-task basis. Commands should be
defined in an array called `cmds`, split into an item per each command line argument. All of the commands are executed
with `dest` as the working directory (as mentioned previously, this defaults to your home directory). If any command
returns a nonzero exit code, Homemaker will display an error message and prompt the user to determine if it should
*abort*, *retry*, or *cancel*. Additionally, if you must have explicit control of whether commands execute before or
after the linking phase, you can use the `cmdspre` and `cmdspost` arrays which have similar behavior.

The example task below will clone and install configuration files for Vim into the `~/.config` directory, and create
links to it from the home directory. You may notice that this task references an environment variable (set by Homemaker
Expand Down
1 change: 1 addition & 0 deletions task.go
Expand Up @@ -69,6 +69,7 @@ func (t *task) process(conf *config) error {
return err
}
}

for _, currCmd := range t.Cmds {
if err := processCmd(currCmd, true, conf); err != nil {
return err
Expand Down

0 comments on commit 87f1a4e

Please sign in to comment.