From ef876d49a38141ec20e12a532669ef03a3d6a93d Mon Sep 17 00:00:00 2001 From: mfrachet Date: Mon, 30 Nov 2020 11:19:43 +0100 Subject: [PATCH] Removing unecessary intermediate variable --- packages/create-gatsby/src/install-plugins.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/create-gatsby/src/install-plugins.ts b/packages/create-gatsby/src/install-plugins.ts index df4b73240c310..2d4ecc1259324 100644 --- a/packages/create-gatsby/src/install-plugins.ts +++ b/packages/create-gatsby/src/install-plugins.ts @@ -60,12 +60,9 @@ export async function installPlugins( rootPath: string, packages: Array ): Promise { - let installPluginCommand - let gatsbyPath - try { - gatsbyPath = resolveGatsbyPath(rootPath) - installPluginCommand = resolveGatsbyCliPath(rootPath, gatsbyPath) + const gatsbyPath = resolveGatsbyPath(rootPath) + const installPluginCommand = resolveGatsbyCliPath(rootPath, gatsbyPath) await addPluginsToProject( installPluginCommand,