Skip to content

Commit e88771e

Browse files
committed
fix: fix plugin name for checking other step config
1 parent 338d3e6 commit e88771e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ async function verifyConditions(pluginConfig, params) {
1111
if (PLUGIN_TYPES.includes(option)) {
1212
for (const plugin of castArray(value)) {
1313
if (
14-
plugin === '@semantic-release/script' ||
15-
(isPlainObject(plugin) && plugin.path === '@semantic-release/script')
14+
plugin === '@semantic-release/exec' ||
15+
(isPlainObject(plugin) && plugin.path === '@semantic-release/exec')
1616
) {
1717
verifyConfig(plugin);
1818
}

test/verify-confitions.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ test.serial('Throw "SemanticReleaseError" if "cmd" options is empty', async t =>
4040
t.is(error.code, 'EINVALIDCMD');
4141
});
4242

43-
test.serial('Throw "SemanticReleaseError" if another script plugin "cmd" options is missing', async t => {
43+
test.serial('Throw "SemanticReleaseError" if another exec plugin "cmd" options is missing', async t => {
4444
const pluginConfig = {cmd: './test/fixtures/echo-args.sh'};
4545
const params = {
4646
logger: t.context.logger,
47-
options: {publish: ['@semantic-release/npm', {path: '@semantic-release/script'}]},
47+
options: {publish: ['@semantic-release/npm', {path: '@semantic-release/exec'}]},
4848
};
4949

5050
const error = await t.throws(verifyConditions(pluginConfig, params));
@@ -53,13 +53,13 @@ test.serial('Throw "SemanticReleaseError" if another script plugin "cmd" options
5353
t.is(error.code, 'EINVALIDCMD');
5454
});
5555

56-
test.serial('Throw "SemanticReleaseError" if another script plugin "cmd" options is empty', async t => {
56+
test.serial('Throw "SemanticReleaseError" if another exec plugin "cmd" options is empty', async t => {
5757
const pluginConfig = {cmd: './test/fixtures/echo-args.sh'};
5858
const params = {
5959
logger: t.context.logger,
6060
options: {
6161
branch: 'master',
62-
publish: ['@semantic-release/npm', {path: '@semantic-release/script', cmd: ' '}],
62+
publish: ['@semantic-release/npm', {path: '@semantic-release/exec', cmd: ' '}],
6363
},
6464
};
6565

0 commit comments

Comments
 (0)