Skip to content

Commit 298bdf6

Browse files
Merge pull request #142 from joelanford/bz-1987160
Bug 1987160: fix(diff): heads-only mode should not attempt to parse old refs
2 parents 5c57b28 + 295bf02 commit 298bdf6

File tree

2 files changed

+6
-2
lines changed
  • staging/operator-registry/cmd/opm/alpha/diff
  • vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/diff

2 files changed

+6
-2
lines changed

staging/operator-registry/cmd/opm/alpha/diff/cmd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ func (a *diff) parseArgs(args []string) {
153153
default:
154154
panic("should never be here, CLI must enforce arg size")
155155
}
156-
a.oldRefs = strings.Split(old, ",")
156+
if old != "" {
157+
a.oldRefs = strings.Split(old, ",")
158+
}
157159
a.newRefs = strings.Split(new, ",")
158160
}

vendor/github.com/operator-framework/operator-registry/cmd/opm/alpha/diff/cmd.go

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)