From 75706a4a8b39bb577c133deb1768781c1e9e47e0 Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Fri, 26 Jun 2020 10:45:39 -0700 Subject: [PATCH] Toolkit: fix grafana-toolkit binary path so toolkit is not run in linked mode (#25860) --- packages/grafana-toolkit/bin/grafana-toolkit.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/grafana-toolkit/bin/grafana-toolkit.js b/packages/grafana-toolkit/bin/grafana-toolkit.js index 6f0e17a345b..8776081ccdc 100755 --- a/packages/grafana-toolkit/bin/grafana-toolkit.js +++ b/packages/grafana-toolkit/bin/grafana-toolkit.js @@ -23,8 +23,9 @@ const isLinkedMode = () => { }; const entrypoint = () => { - const resolvedJsDir = path.resolve(`${__dirname}/../dist/src/cli/index.js`); - const resolvedTsDir = path.resolve(`${__dirname}/../src/cli/index.ts`); + const entrypointBase = `${__dirname}/../src/cli/index`; + const resolvedJsDir = path.resolve(`${entrypointBase}.js`); + const resolvedTsDir = path.resolve(`${entrypointBase}.ts`); // IF we have a toolkit directory AND linked grafana toolkit AND the toolkit dir is a symbolic lik // THEN run everything in linked mode @@ -46,4 +47,3 @@ const entrypoint = () => { }; require(entrypoint()).run(includeInternalScripts); -