From caa7e2cee2f3125476aea301a300d951e69bbdfb Mon Sep 17 00:00:00 2001 From: stephledev Date: Wed, 25 Apr 2018 11:11:47 +0200 Subject: [PATCH] check if `strapi start` runs inside a strapi project --- packages/strapi/bin/strapi-start.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/strapi/bin/strapi-start.js b/packages/strapi/bin/strapi-start.js index def2b3a857..ddb022ce8b 100755 --- a/packages/strapi/bin/strapi-start.js +++ b/packages/strapi/bin/strapi-start.js @@ -27,6 +27,11 @@ const { cli, logger } = require('strapi-utils'); */ module.exports = function() { + // Check that we're in a valid Strapi project. + if (!cli.isStrapiApp()) { + return logger.error('This command can only be used inside a Strapi project.'); + } + try { const strapi = function () { try {