Skip to content

Commit b8f92c6

Browse files
committed
Fix code to pass tests
1 parent 5b092b1 commit b8f92c6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

backup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (b *Backup) CanRun() error {
5252
return fmt.Errorf("the setting targetPath MUST exist within a backup configuration")
5353
}
5454
// script must exist, having only script means this is handled in the script
55-
if b.ScriptPath == "" {
55+
if b.ScriptPath == nil {
5656
return fmt.Errorf("the setting scriptPath must exist within a backup configuration")
5757
}
5858
if !b.ShouldRun() {

backup_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func TestCanRun(t *testing.T) {
6868
}
6969
err = bkpScriptPathMissing.CanRun()
7070
if err == nil {
71+
t.Logf("ScriptPath is %v", bkpScriptPathMissing.ScriptPath)
7172
t.Log("Missing scriptPath has to fail function 'CanRun()'")
7273
t.Fail()
7374
}

0 commit comments

Comments
 (0)