Skip to content

Commit 295bf02

Browse files
committed
fix(diff): heads-only mode should not attempt to parse old refs (#727)
Signed-off-by: Joe Lanford <[email protected]> Upstream-repository: operator-registry Upstream-commit: 70d0f510ba911d44917f80e364dcc92e95363e78
1 parent 5c57b28 commit 295bf02

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)