Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fixing generic mgr type.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Oct 10, 2019
1 parent 5524f17 commit c19dce6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/mgr/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func Create(mgrType string, pipelineData *pipeline.Data, config config.Interface
func Detect(packageType string, pipelineData *pipeline.Data, config config.Interface, client *http.Client) (Interface, error) {

var mgrType string
mgrType = "unknown"

switch packageType {
//chef dependency managers
Expand Down Expand Up @@ -100,8 +101,12 @@ func Detect(packageType string, pipelineData *pipeline.Data, config config.Inter
mgrType = "bundler"
}

//empty/generic package manager. Noop.
case "generic":
mgrType = "generic"

default:
return nil, errors.ScmUnspecifiedError(fmt.Sprintf("Unknown %s Packager Manager Type: %s", packageType, mgrType))
return nil, errors.ScmUnspecifiedError(fmt.Sprintf("Unknown Manager for Package Manager (%s): %s", packageType, mgrType))
}

return Create(mgrType, pipelineData, config, client )
Expand Down

0 comments on commit c19dce6

Please sign in to comment.