screwdriver-executor-router
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -20,2 +20,3 @@ 'use strict'; | ||
const executorConfig = config.executor; | ||
const defaultPlugin = config.defaultPlugin; | ||
@@ -27,3 +28,2 @@ if (!executorConfig || !(Array.isArray(executorConfig)) || executorConfig.length === 0) { | ||
super(); | ||
this.defaultExecutor = config.defaultPlugin; | ||
@@ -45,5 +45,8 @@ executorConfig.forEach((plugin) => { | ||
// Set the default executor | ||
if (!this.defaultExecutor && !config.defaultPlugin) { | ||
if (defaultPlugin && defaultPlugin === plugin.name) { | ||
// set the default plugin to the desired one | ||
this.defaultExecutor = executorPlugin; | ||
} else if (!defaultPlugin && !this.defaultExecutor) { | ||
// When given no default plugin, use the first module we instantiated | ||
this.defaultExecutor = executorPlugin; | ||
} | ||
@@ -50,0 +53,0 @@ |
{ | ||
"name": "screwdriver-executor-router", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A generic plugin for routing builds to specified executors", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7705
65