minor fixups
This commit is contained in:
parent
4c98383b21
commit
87f1a4e15c
12
README.md
12
README.md
@ -223,12 +223,12 @@ shown below:
|
|||||||
|
|
||||||
Homemaker will process the dependency tasks before processing the task itself.
|
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
|
In addition to creating links, Homemaker is capable of executing commands on a per-task basis. Commands should be
|
||||||
before and after linking your configuration. Commands should be placed in either an array, under the field `precmds` or
|
defined in an array called `cmds`, split into an item per each command line argument. All of the commands are executed
|
||||||
`postcmds` (for commands to be run before and after linking respectively). These commands should be split into an array of
|
with `dest` as the working directory (as mentioned previously, this defaults to your home directory). If any command
|
||||||
strings, with each entry corresponding to one command line argument. All of the commands are executed with `dest` as
|
returns a nonzero exit code, Homemaker will display an error message and prompt the user to determine if it should
|
||||||
the working directory (as mentioned previously, this defaults to your home directory). If any command returns a nonzero
|
*abort*, *retry*, or *cancel*. Additionally, if you must have explicit control of whether commands execute before or
|
||||||
exit code, Homemaker will display an error message and prompt the user to determine if it should *abort*, *retry*, or *cancel*.
|
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
|
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
|
links to it from the home directory. You may notice that this task references an environment variable (set by Homemaker
|
||||||
|
1
task.go
1
task.go
@ -69,6 +69,7 @@ func (t *task) process(conf *config) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, currCmd := range t.Cmds {
|
for _, currCmd := range t.Cmds {
|
||||||
if err := processCmd(currCmd, true, conf); err != nil {
|
if err := processCmd(currCmd, true, conf); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user