From aad7f486d21c9744d694e04dfef52ccd778a7289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20GEORGET?= Date: Wed, 24 Jun 2020 18:27:49 +0200 Subject: [PATCH] Support STRAPI_UUID_PREFIX env var (#6797) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Georget --- packages/strapi-generate-new/lib/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/strapi-generate-new/lib/index.js b/packages/strapi-generate-new/lib/index.js index bad74c5701..259db1ed58 100644 --- a/packages/strapi-generate-new/lib/index.js +++ b/packages/strapi-generate-new/lib/index.js @@ -23,10 +23,7 @@ module.exports = (projectDirectory, cliArguments) => { const rootPath = resolve(projectDirectory); - const tmpPath = join( - os.tmpdir(), - `strapi${crypto.randomBytes(6).toString('hex')}` - ); + const tmpPath = join(os.tmpdir(), `strapi${crypto.randomBytes(6).toString('hex')}`); const useNpm = cliArguments.useNpm !== undefined; @@ -40,7 +37,7 @@ module.exports = (projectDirectory, cliArguments) => { debug: cliArguments.debug !== undefined, quick: cliArguments.quickstart !== undefined, docker: process.env.DOCKER === 'true', - uuid: uuid(), + uuid: (process.env.STRAPI_UUID_PREFIX || '') + uuid(), deviceId: machineIdSync(), tmpPath, // use yarn if available and --use-npm isn't true