feat: make dst also abs

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias 2019-01-01 13:26:42 +00:00
parent 215fe1d41a
commit c624ebbc53

View File

@ -27,6 +27,7 @@ type Runner struct {
// Run runs the hooks for the before and after event.
func (r Runner) Run(fn func() error, event string, path string, dst string, u *User) error {
path = afero.FullBaseFsPath(u.Fs.(*afero.BasePathFs), path)
dst = afero.FullBaseFsPath(u.Fs.(*afero.BasePathFs), dst)
err := r.do("before_"+event, path, dst, u)
if err != nil {
return err