improve lookup when no pipeline name

This commit is contained in:
Brad Rydzewski
2019-11-08 11:24:38 -08:00
parent 18d8f53fa8
commit e699edd0e1
2 changed files with 9 additions and 2 deletions

View File

@@ -1,7 +1,12 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## 1.0.1
### Fixed
- handle pipelines with missing names
## 1.0.0
### Added ### Added
- ported docker pipelines to runner-go framework - ported docker pipelines to runner-go framework

View File

@@ -25,5 +25,7 @@ func Lookup(name string, manifest *manifest.Manifest) (*Pipeline, error) {
// helper function returns true if the name matches. // helper function returns true if the name matches.
func isNameMatch(a, b string) bool { func isNameMatch(a, b string) bool {
return a == b || (a == "" && b == "default") return a == b ||
(a == "" && b == "default") ||
(b == "" && a == "default")
} }