diff --git a/backup.go b/backup.go index cbbabbc..0f53ae7 100644 --- a/backup.go +++ b/backup.go @@ -52,7 +52,7 @@ func (b *Backup) CanRun() error { return fmt.Errorf("the setting targetPath MUST exist within a backup configuration") } // script must exist, having only script means this is handled in the script - if b.ScriptPath == "" { + if b.ScriptPath == nil { return fmt.Errorf("the setting scriptPath must exist within a backup configuration") } if !b.ShouldRun() { diff --git a/backup_test.go b/backup_test.go index 1d9401c..2dc5516 100644 --- a/backup_test.go +++ b/backup_test.go @@ -68,6 +68,7 @@ func TestCanRun(t *testing.T) { } err = bkpScriptPathMissing.CanRun() if err == nil { + t.Logf("ScriptPath is %v", bkpScriptPathMissing.ScriptPath) t.Log("Missing scriptPath has to fail function 'CanRun()'") t.Fail() }