Skip to content

Commit

Permalink
Merge pull request #27 from pmowrer/invalid-config-error
Browse files Browse the repository at this point in the history
Invalid config error
  • Loading branch information
pmowrer authored Jan 5, 2021
2 parents f2de00c + 5aad3e1 commit d68fe61
Show file tree
Hide file tree
Showing 3 changed files with 1,651 additions and 1,528 deletions.
8 changes: 8 additions & 0 deletions src/appendStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ const appendStep = (

if (!pluginName) {
return defaultReturn;
} else if (typeof pluginName !== 'string') {
throw new Error(
`${
wrapperName ? wrapperName : 'semantic-release-plugin-decorators'
}: Incorrect plugin name type. Expected string but was ${JSON.stringify(
pluginName
)}.`
);
}

const plugin = require(pluginName);
Expand Down
8 changes: 8 additions & 0 deletions src/wrapStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ const wrapStep = (

if (!pluginName) {
return defaultReturn;
} else if (typeof pluginName !== 'string') {
throw new Error(
`${
wrapperName ? wrapperName : 'semantic-release-plugin-decorators'
}: Incorrect plugin name type. Expected string but was ${JSON.stringify(
pluginName
)}.`
);
}

const plugin = require(pluginName);
Expand Down
Loading

0 comments on commit d68fe61

Please sign in to comment.