validate and show cwd

This commit is contained in:
cupcakearmy 2021-07-12 19:10:36 +02:00
parent b9b8857bf4
commit 7bebd04482
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9

View File

@ -132,8 +132,15 @@ func (l Location) Backup(cron bool) []error {
Command: "bash", Command: "bash",
} }
if err := l.validate(); err != nil {
errors = append(errors, err)
colors.Error.Print(err)
goto after
}
if t == TypeLocal { if t == TypeLocal {
dir, _ := GetPathRelativeToConfig(l.From) dir, _ := GetPathRelativeToConfig(l.From)
colors.Faint.Printf("Executing under: \"%s\"\n", dir)
options.Dir = dir options.Dir = dir
} }