From 7bebd04482efb8872a36ef6204d0cbc7c93162c7 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 12 Jul 2021 19:10:36 +0200 Subject: [PATCH] validate and show cwd --- internal/location.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/location.go b/internal/location.go index 01c95c6..aaac32f 100644 --- a/internal/location.go +++ b/internal/location.go @@ -132,8 +132,15 @@ func (l Location) Backup(cron bool) []error { Command: "bash", } + if err := l.validate(); err != nil { + errors = append(errors, err) + colors.Error.Print(err) + goto after + } + if t == TypeLocal { dir, _ := GetPathRelativeToConfig(l.From) + colors.Faint.Printf("Executing under: \"%s\"\n", dir) options.Dir = dir }