Skip to content

Commit

Permalink
fix(cli): only load self if the package starts with sugarcube-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
critocrito committed Nov 10, 2019
1 parent dd06c50 commit b532817
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/lib/packages.js
Expand Up @@ -38,7 +38,7 @@ export const loadSelf = flow([
() => require(`${path.join(process.cwd(), "package")}`),
property("name"),
pkgName => {
if (/^sugarcube-/.test(pkgName)) {
if (/^sugarcube-plugin/.test(pkgName)) {
const name = pkgName.match(/[^/]+$/g)[0].replace(/^sugarcube-/, "");
// eslint-disable-next-line import/no-dynamic-require, global-require
return {[name]: require(process.cwd())};
Expand Down

0 comments on commit b532817

Please sign in to comment.