Support STRAPI_UUID_PREFIX env var (#6797)

Signed-off-by: Aurélien Georget <aurelsicoko@gmail.com>
This commit is contained in:
Aurélien GEORGET 2020-06-24 18:27:49 +02:00 committed by GitHub
parent fef24faf63
commit aad7f486d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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