Skip to content
This repository was archived by the owner on Sep 27, 2020. It is now read-only.

Commit 58abf69

Browse files
committed
fix: fix always snapshot updated bug
1 parent 6c6c82c commit 58abf69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

snapshot/snapshot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (c *Config) Run(
4747
r := c.Recorder
4848
fpath := r.Path(t)
4949
existed := r.Exists(fpath)
50-
if !existed || c.Overwrite || strings.Contains(fpath, c.self) {
50+
if !existed || c.Overwrite || (c.self != "" && strings.Contains(fpath, c.self)) {
5151
t.Logf("save snapshot data: %q", fpath)
5252
if err := r.Loader.Save(fpath, got, c.Extra); err != nil {
5353
t.Fatalf("record: %s", err)

0 commit comments

Comments
 (0)